Question: How to redirect www to non-www with AWS
See original GitHub issueWith AWS, Can you guide me to redirect www to non-www to avoid duplicate content? Should we create a s3 bucket and a new Cloud front distribution? (https://www.pbxdom.com/how-redirect-non-www-to-www-with-amazon-cloud-front-route-53-and-s3)
or, can we set it up in the serverless.yml
file?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
How do I redirect www to non-www in Route53? - Server Fault
Setup S3 with static website redirect to your non-www domain; Create a Cloudfront distibution to your S3 (using the S3 domain, not the...
Read more >Redirecting non-WWW to WWW in AWS not working
I tried to set a redirection from a non-WWW domain to a WWW domain. For this thread, my domain is example.com . So...
Read more >How to set up a root domain (non-www) in AWS Route 53
Step 1. From the Strattic dashboard, click the Details button, then click the Domain menu item, input your domain (without the www) and...
Read more >Redirect www to non-www and HTTP to https in ... - Ly Channa
1. Use S3 + Cloudfront to capture the domain and redirect it to the primary domain. · 2. Modify the application server to...
Read more >Route 53 redirect www to non-www? : r/aws - Reddit
You need a proper 301 permanent redirect. Route 53 alone cannot do this. Use the S3 bucket method you described. Point A Alias...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve released the PR: https://github.com/serverless-nextjs/serverless-next.js/pull/639 which can support this domain-level redirect in the Lambda@Edge itself. If you wish, you can try this method - please refer to the README for more details.
@pecoram it should be in 1.18.0-alpha.1. You can check the commit for the git tag for
@sls-next/serverless-component
https://github.com/serverless-nextjs/serverless-next.js/commit/a12e31ac06378f9fe26189b95a9b032942656380 (I know it’s a bit confusing with the many tags, we will work on improving the release changelogs soon).