I have a question what should I use for subdomain redirection
I want to create
webmail.mywebsite.com and then redirect it to gmail.com
I try to do thet with nginx
server{ server_name webmail.mywebsite.com 301 https://www.gmail.com }
But nothing happens when I try to open webmail.mywebsite.com …
So I get idea that maybe I should use route53 if so what do you think what record should I put ?
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!
Route53 can’t return redirects, it’s DNS system. You need to us Nginx.
Your problem seems to be the Nginx config file is incorrect. I’ve copied and pasted a working Nginx config I have and changed the domains for you
server { listen 80; server_name webmail.mywebsite.com; return 301 https://www.gmail.com; } Your config appears to simply be missing is the word “return” in front of the 301.
If you want to redirect https then that’s a little more work, as you need a certificate and such. You can find examples online.
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.