I want to set up in AWS a simple 301 redirect configuration from my 'non-www' URL to the 'www' URL.
example.com --> 301 redirect --> www.example.com
In AWS I configured Route 53 record set in this way:
www.example.com --> simple routing to my EC2 instance
example.com --> configured as an alias of www.example.com
In this way the redirect works fine, but if I check the redirect code with an online redirect check (like this link) the result is not 301 but 200.
So, this is my question: How can I configure Route 53 Record set to make a 301 redirect?
Thank you in advance and thanks for your time.