Site not working with www

My site is reacheable only without www.

I have added a CNAME record: www but it still doesn’t work.

Any suggestion ?

Show comments

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.

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.

I added two cname on DNS an it works!! <br>Look the screenshot

If it is a wordpress installation, you also need to make sure that the siteurl for the wordpress website starts with www, else you will get the same problem.

I signed up just to add my solution, I spent days trying to figure out how to get the WWW version to work! I have hosting at Cloudways btw. So the first part is you need an A record with WWW pointed at your server IP address. But to really make it work I needed to add my WWW domain version to my SSL certificate on Cloudways. I already had “” but needed to add “” to the SSL. You need to add the www A record first before your SSL will update. In about an hour the www version will work.

I hope that saves a few people some time and hassle! Trying to edit the htaccess file and redirecting domains was not the solution I needed.