Portal HomeClient AreaAnnouncementsKnowledgebaseSupport TicketsDownloads

Knowledgebase
You are here: Portal Home > Knowledgebase > cPanel Support > Redirects > How do I direct non-www to www?

How do I direct non-www to www?

Simply add the following to the .htaccess file in your public_html folder:

RewriteEngine On
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L]

Be sure to replace domain with your domain name


Was this answer helpful?

Add to Favourites
Print this Article

Also Read
Removing a redirect (Views: 169)
Redirects (Views: 165)

Powered by WHMCompleteSolution


Language: