I want to configure a redirection from
www.example.com (since CNAME is not allowed for top-level domains). How can I do this in AWS Route 53 (or any other DNS provider, in general)?
Think about it, I'll try to explain with an example. This is what you want:
All traffic going to example.com would be redirected to www.example.com. Mail and other subdomains would be impacted.
To solve your problem, what you could do is the following:
Then you could set up a vhost in apache (if you are using that. I'm sure most software has a capability like this) that redirects all traffic that hits on example.com to www.example.com.