Question

www not working

  • Posted April 22, 2014

I’m just getting my first wordpress droplet set up. Everything seems to be working except for the ‘www’ version of my domain. Domain in question - qcmny.com

Subscribe
Share

how did you add the cname? in the first input did you put dot(.) next to www or not? i have the same problem for my two sites.


Submit an 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.

try to modify your .htaccess make sure you add the lines below: <br> <br> # (http://www.example.com/… will be redirected to http://example.com/…) <br> RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC] <br> RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]

Thanks Marinos! <br> <br>It looks like the CNAME may have done it, new to manually setting up DNS ;)

What are you using as you webserver, nginx or apache? <br> <br>It looks like which ever one you use has a rewrite rule set up that redirects www.yourdomain.com to yourdoamin.com That’s pretty standard practice. In fact, choosing just one or the other can be important to your page rank in web searches. So, I’d suggest leaving it as it is.

Sorry I misread your question, If you want to have only www edit your /etc/apache2/sites-available/your-web-site and add the www. <br>You need again to have a CNAME.

First of all let me say that I like your website. <br>Now about the question, if you haven’t add a CNAME in DNS please do. If you have then check your .htaccess file and make sure it looks like this. <br>Note: Haven’t tried this cause I don’t use Apache <br> <br>RewriteEngine On <br>RewriteCond %{HTTP_HOST} ^example.com$ <br>RewriteRule (.*) http://www.example.com/$1 [R=301,L]