I need to change the custom URL for a blog hosted on Ghost Pro - I’m changing from subdomain.olddomain.com
to newdomain.com
DNS for both olddomain.com
and newdomain.com
are managed in Cloudflare.
So far I’ve set up the new domain and configured this as a custom URL in Ghost pro, and all works fine when I directly access the new URL.
I am now trying to redirect traffic from the old URL to the new one, so users with old links or bookmarks can still access the site.
I just can’t get this to work! Here’s what I’ve tried:
- removed the CNAME record for
subdomain.olddomain.com
- created a redirect rule under
olddomain.com
, with these details:
** expression(http.host equals "subdomain.olddomain.com.")
** redirect type: static
** redirect URL:https://newdomain.com
** statuscode:301
** Preserve query string:true
(this is in an attempt to preserve deep links)
I found some online help that seems to suggest I should enable Cloudflare proxy on my A and CNAME records. However, Ghost docs say to use DNS only for Cloudflare DNS config, and the site does not load at all if Cloudflare proxy is enabled, so I guess that is the wrong way to go…
Maybe this request should actually go to Cloudflare? I’m posting it here too in case someone has found a way to make this work specifically for a Ghost Pro blog…
Thanks