Server Alias

Found a potential bug that has happened to me the last few days with a couple of different domains while playing with some DNS settings.

Long story short: it appears that when changing a <www.domain.tld> dns entry from CNAME record to A record, and then back again to CNAME, the Server Alias entry in the respective /etc/httpd/conf.d/domain.tld.conf is not being re-added properly. So, that domain then defaults to re-directing to the ‘main’ IP and/or domain of the box.

Entering the correct Server Alias manually and restarting Apache corrects the issue.



Interesting JB, thanks for reporting this. I’ll input it into the system so we can take a look.


[SIZE=2]Can you give any suggestions as to why one of my sites no longer works when a www. is put infront of the site name? It was working as either and [/SIZE]
[SIZE=2]I don’t think I changed anything but now it appears that if I put the www in then it redirects to my other main site that is Since I haven’t been able to find a way to correct it yet I’ve just put a note on the site for people to click on to get them into the site.[/SIZE]
[SIZE=2]Any ideas what might be causing this all of a sudden??? :-)[/SIZE]

Hi Noel,

Did you do the same thing as JayBean (changed the www. record from a CNAME to an A record and back)? If so, this could explain why it stopped working.

Check /etc/httpd/conf.d/ and see if “” is listed among the other domains in the ServerAlias directive.


Thank you! I’ll check that now :slight_smile: