404 Error Suddenly Appearing for www URL but non-www still working

October 8, 2019 90 views
DNS Apache WordPress

This site, degrandchamps.com, has been up and running for a couple years now. Suddenly about two weeks ago the www URL quit working. When trying to access the site using www it returns a 404 error. I have researched and tried so many things I can’t even begin to start at what I have tried. I am getting pretty desperate as this client is quite frustrated. There were two errors at first. The one I corrected was that the www suddenly started returning that it wasn’t secured. I fixed that by reinstalling certbot and the certificates. This is a Wordpress site on Ubuntu 16.04 with Apache 2 installed.

1 Answer


I believe that you either have two separate Apache Vhosts, one for your www version and one for the non-www version with different document root directories.

If this is the case what you need to do is:

  • Remove your duplicated www virtual host
  • Add your www version to your main vhost under the server alias section
  • Re-issue Let’s Encrypt for both www and the non www version so that the SSL certificate includes both

Let me know how it goes!

If this is not the case, you could share your Apache Vhost for your domain here so that I could advise you further.


Have another answer? Share your knowledge.