Should I use nginx or route53 for redirect?

Posted September 15, 2020 388 views

I have a question what should I use for subdomain redirection

I want to create and then redirect it to

I try to do thet with nginx


But nothing happens when I try to open ..

So I get idea that maybe I should use route53 if so what do you think what record should I put ?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

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;
return 301;
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.

  • Hi @pistle2020 I still have problem I copied your code but I still get error when I try to access

    “ server IP address could not be found.”

    I alrady have install SSL(lets encrypt) on my server