Accredited Registrar Accredited Registrar

Frequently Asked Question

FAQ / Linux Shared Hosting


how to redirect my domain from non.www to www in cpanel ?

Dont create a redirect for domain-name.com to www.domain-name.com or from domain-name.com to domain-name.com/index.php or domain-name.com/anything.php. Doing this will cause an infinite loop.
If you need to redirect domain from non.www to www or any page, use mod_rewrite rule code in .htaccess file.

For redirecting domain name from non.www to www, menstion below code in .htaccess file.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

How this faq is helpful:

Not at all
helpful
Not much
helpful
Some what
helpful
Very
helpful
Extremely
helpful

What could be better? (Optional)
X
  Not related to my issue
  Too complicated explanations
  Too much information
  Incorrect information
  Unclear information
  Incomplete information
  Too old information
Do you have any other feedback about this faq ?
1000