You might want to consider making sure UseCanonicalName is on as well, as that 
will (and I quote) "use the hostname and port specified in the ServerName 
directive to construct the canonical name for the server" in any cases where 
Apache itself has to construct a URL referring to the site.

On 18 Jul 2014, at 10:06, Tony Cowderoy <t...@cowderoy.co.uk> wrote:

> Use mod_rewrite and return a 301 HTTP status.  See 
> http://httpd.apache.org/docs/current/rewrite/remapping.html
> 
> Tony Cowderoy
> 
> On 18/07/2014 09:41, Mark Rogers wrote:
>> I should really know the answer to this already but...
>> 
>> Currently I have several sites configured in Apache along the lines of:
>>    ServerName www.example.co.uk
>>    ServerAlias example.co.uk *.example.co.uk
>>    ServerAlias example.com *.example.com
>> 
>> This is apparently causing Google penalties because something somewhere is 
>> seeing otherwise perfectly legitimate links from one of my sites to another 
>> as coming from abc.example.co.uk (where abc is any random set of 
>> characters). 
>> 
>> I need to change things so that all the ServerAlias'es perform a permanent 
>> redirect to the ServerName (ie example.com/foo/bar will redirect to 
>> www.example.co.uk/foo/bar)
>> 
>> -- 
>> Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450
>> Registered in England (0456 0902) @ 13 Clarke Rd, Milton Keynes, MK1 1LG
>> 
>> 
>> 
>> _______________________________________________
>> Peterboro mailing list
>> 
>> Peterboro@mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/peterboro
> 
> _______________________________________________
> Peterboro mailing list
> Peterboro@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/peterboro


_______________________________________________
Peterboro mailing list
Peterboro@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/peterboro

Reply via email to