how to set "www" subdomain for one-click ghost (with SSL)

Hi guys, I’m new here (and new managing a vps), I followed this step-by-step guide to install a ghost blog: , it works fine.

Then I added an A record pointing to my ip (ipv4), but it doesn’t work, I cant visit and I get an SSL error. can you help me to fix it? :c

ps. I’m noobie in these stuffs, and sorry for my english.

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.

Ok, thanks for support team, I could solve that. If anyone need do it, just follow these steps:

  1. add an A record “www” with your vps’s ip as value
  2. go to /var/www/ghost and run ghost config url
  3. then, generate a ssl setup running ghost setup nginx ssl
  4. set again your main domain ghost config url
  5. edit the nginx config files for your second domain to redirect to your main domain: edit both: /system/files/ and /system/files/ , replacing the content of the first location block (leave the .well-known location block - this is used for renewing certificates) with:
return 301$request_uri;

  1. to finish run sudo nginx -t and then sudo nginx -s reload