Redirect to www

History / Edit / PDF / EPUB / BIB /
Created: June 4, 2006 / Updated: March 7, 2021 / Status: unknown / 1 min read (~88 words)
apache .htaccess rewriterule

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^your-domain-here\.com
RewriteRule ^(.*)$$1 [R=permanent,L]

This code placed in your .htaccess will give you the possibility to send any visitor coming to to This has a great advantage especially with search engines because all your pages will be referenced under the same "subdomain" as if you had both, you'd get links and links which would count as different pages.