Facebooktwittergoogle_pluslinkedinmailby feather


Redirecting your domain.com to www.domain.com does not requiere anymore to have a host/virtualhost and html redirection file, that was 10 years before!

Here is the practical way for AWS Route53 and Cloudflare:

1. AWS Route53:


– Go to S3

– Create a new bucket named "domain.com"

– Properties –> Static WebSite Hosting

– Redirect all requests to another hostname

– www.domain.com should filled automatically

– Click "Save"

AWS Route53 URL Redirection

– Goto Route53

– Edit A record

– Select Alias Yes

– Select the s3 bucket you already created

– Click Yes

AWS Route53 S3 Alias URL Redirection

2. CloudFlare:

For Cloudflare it is much more easy, here it is:

– Open "Page Rules" tab

– Add new rule with "URL pattern "domain.com/*"

– Change Forwarding to On

– Enter Forwarding URL as "htttp://www.domain.com/$1"

– Choose 301 redirection

– Click "Add Rule"

The final should be as below:

Cloudflare URL Redirection 301