How do I change my configured site URL?

If you're running into issues with a misconfigured protocol or domain, you can update it easily with the ghost config command.

Change the configuration

Update your url by issuing the ghost config command from inside your Ghost directory:

ghost config url https://my-domain.com

You can easily find where Ghost was installed by calling the ghost ls utility from anywhere on your server.

Setup SSL

If you're switching to a url that contains HTTPS (recommended) then you'll need to make sure SSL is setup for this domain:

ghost setup nginx ssl

Restart Ghost

To apply the changes you must restart ghost:

ghost restart

These are some common problems caused by a misconfigured URL:

Canonical, RSS or Sitemap URLs are HTTP instead of HTTPS

Ghost uses the configured URL to generate all URLS. Make sure this URL starts with https:// if you want Ghost to generate HTTPS links by default.

Canonical, RSS, or Sitemap URLs contain localhost

You need to configure your domain using ghost config as described above.

Scheduled posts not publishing

When  publishing a scheduled post, Ghost makes a call to the configured URL  that can be fail if your proxy or URL are misconfigured. Often this  occurs when the site is served over HTTPS but the URL is configured to  HTTP.

Admin panel is incorrectly redirected

Make  sure your configured URL is the one you are using to access the admin  panel. You can set a separate domain for your admin panel using ghost config admin.url https://your-admin-domain.com.

Setting Ghost URL to HTTPS causes an infinite redirect loop

This is a proxy configuration issue. Make sure that X-Forwarded-Proto is being set to https, and that the X-Forwarded-Host and X-Forwarded-For headers are being set correctly by nginx or any other proxy you might be using.

Links wrong when behind reverse proxy

Make sure the configured URL matches the one being used to visit your site, including the protocol and any subdirectories using ghost config as described above.

My HTTPS URL isn't working

Make sure you've run ghost setup nginx ssl.

I've configured my URL and Ghost isn't using it

Restart Ghost to apply config changes using ghost restart.