Stop apache2 redirecting domain to subdomain

March 3, 2019 286 views
Apache Ubuntu 16.04

I created a subdomain as an apache virtual host. Let’s call it . I was using this subdomain as a temporary location while I was building the website. I added that subdomain to the vhosts .conf file, and all was working well with that as well as all other sites I have hosted. Once the actual domain was purchased and the DNS directed to the server using the A record, I removed the subdomain [] reference on that server. Problem is, not matter what I do, Apache2 keeps redirecting my domain to ! I have no reference to in my vhosts .conf file. No folder, nothing that I can find on the server that references that subdomain any longer. I have gone as far as removing all reference to the on that server in hopes of getting rid of the reference someplace I haven’t looked, and Apache2 is STILL redirecting my domain to that subdomain. I am hoping someone can help me solve this once and for all. Please feel free to ask questions if my explanation above is not clear.

Thanks in advance!

1 Answer

So, it turns out, that the Wordpress install was doing the redirecting.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!