By akash
Hi there,
I done the one click Ghost install and this works fine.
Then I decided to move my blog: FROM: blog.club.in (ccTLD) TO: blog.club.com (gTLD)
Basically from a ccTLD to a gTLD.
How do I setup a 301 with Nginx to redirect all http and https traffic from my ccTLD to the .com?
Thanks!
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!
Hi Jason,
Thanks for your answer. I have a follow up question.
Which is the file to modify? (is it default) or the conf file pertaining to ccTLD (club.in)
I have screenshots that might help:
This is etc/nginx/sites-available directory: https://i.imgur.com/OUF2UIR.png
These are the conf files inside the ghost directory: https://i.imgur.com/gnKMKup.png
Thanks!
server {
listen 80
listen 443;
server_name blog.club.in;
location / {
return 301 https://blog.club.com$request_uri;
}
}
you can set the config from <jasonjpeters> directly to your nginx.conf innerline to section http {} like
...
server {
listen 80
listen 443;
server_name blog.club.in;
location / {
return 301 https://blog.club.com$request_uri;
}
}
...
}
please know that “…” dots are your other config parameters
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.