Add www to domain

I have Ghost 0.4.2 set up on However, when you enter, you are still presented with the same general page. None of my links work with that, though, because I have Ghost configured to use www before the URL.

I tried adding a cname with www pointing to @, but that didn’t work. Then I added an A record with www pointing to my server’s IP address. That didn’t work either.

Does anyone know of a way to force prepend www to the domain?

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.

Glad it worked! <br> <br>No, you should keep DNS records pointing both and to that IP address.

Worked perfect, Andrew. One more thing: should I remove any of the records I added in DNS settings?

You can force a redirect to www by editing the nginx configuration like so: <br> <br><pre> <br>server { <br> listen 80; <br> server_name; <br> return 301$request_uri; <br>} <br>server { <br> listen 80; <br> server_name ; <br> <br> client_max_body_size 10M; <br> <br> location / { <br> proxy_pass http://localhost:2368/; <br> proxy_set_header Host $host; <br> proxy_buffering off; <br> } <br>} <br></pre> <br> <br>This is found in: <br> <br><pre> <br>/etc/nginx/conf.d/default.conf <br></pre> <br> <br>Let us know how it goes!