Question

Can't access site with www, but works without www

I just noticed that certbot had failed its renewal, and when running certbot manually I was able to renew certificate on 1: mydomain.com, but when trying to renew 2: www.mydomain.com I get the error:

Failed authorization procedure. www.mydomain.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.mydomain.com/.well-known/acme-challenge/Yz4RezbUvNFiGMoUi__MV5-XpmQ3tD2DwSeO4cpxWrw [2607:f8b0:400f:800::2013]: "<!DOCTYPE html>\n<html lang=en>\n  <meta charset=utf-8>\n  <meta name=viewport content=\"initial-scale=1, minimum-scale=1, width=dev"

When opening www.mydomain.com in the browser I get a 404 error from google:

404. That’s an error.

The requested URL /login was not found on this server. That’s all we know. 

But, mydomain.com works fine (without www). I apparently have no idea what I’m doing.

I’m running the ubuntu droplet with apache. Any thoughts?


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Accepted Answer

Turns out I’m really stupid! I had messed up the DNS records

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.