DNS redirection - Problem Using AWS service

0

How to configure my DNS server to redirect always pegadadelixo.com.br to www.pegadadelixo.com.br?

    
asked by anonymous 19.05.2016 / 19:24

3 answers

3

With .htacess you can also adjust this:

RewriteEngine On

    RewriteCond %{HTTP_HOST} !^$
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteCond %{HTTPS}s ^on(s)|
    RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
19.05.2016 / 19:30
1

Just set up a record of type CNAME :

dominio.com   CNAME   www.dominio.com   300

(300 is the TTL, in seconds, of that record.)

    
19.05.2016 / 19:29
0

Because DNS does not allow CNAME for the zone root (without www.), consider the following alternatives:

  • Use a CloudFront distribution with multiple CNAMES: link

  • Create an ALIAS by pointing directly to your ELB, S3 Static Website or CloudFront distribution. link

  • If stored in S3, use the redirect rules: link

24.05.2016 / 00:54