How can I setup a domain alias?


#1

So let’s say I get my ghost blog here and I want to ask is it possible to set up an alias for the ghost blog? Should I directly use proxy_pass since I’m using nginx, or there’s other better method for ghost? Notice I’m not looking for redirection.


How activate a aliase "example.com" & "www.example.com"
#2

Ghost is designed to run under only one URL, so it’s not really possible to “alias” your instance. Aliasing would also hurt SEO since you would be serving duplicate content from different locations.


#3

But won’t ghost setup canonical tag? If yes, why will it hurt SEO?

And if I set proxy_pass to my ghost site, what will went wrong? Is there any code that prevent ghost been accessing with different URL?


#4

Ghost will redirect you to the proper domain if the request didn’t originate from it

That’s incorrect Ghost will redirect you to the proper scheme (i.e. http -> https) if needed


#6

Then is it possible to disable it? For redirecting to correct domain.


#7

You’re right, Ghost does setup the canonical tag

You can use nginx for this - just take whichever template you need and update the variables in it. It will look similar to the nginx config that your Ghost instance currently has. Make sure you include the X-Forwarded-Proto header


#8

So the template you provide can help me setup alias without them redirecting to the domain setup in ghost config?


#9

Yes, it should work.