How to configure my DNS server to redirect always pegadadelixo.com.br to www.pegadadelixo.com.br?
How to configure my DNS server to redirect always pegadadelixo.com.br to www.pegadadelixo.com.br?
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]
Just set up a record of type CNAME
:
dominio.com CNAME www.dominio.com 300
(300 is the TTL, in seconds, of that record.)
Because DNS does not allow CNAME for the zone root (without www.), consider the following alternatives: