Report this

What is the reason for this report?

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

Posted on October 8, 2019

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.



This textbox defaults to using Markdown to format your answer.

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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

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.

Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.