How to Add www to URL in Wordpreess or php Using Htaccess

You have a Web Site Called and When user try to access you website without www you need to append www at the Domain or if the user is access you page example : this page need to add follow the below steps

go to .htaccess find RewriteEngine on the added below for Redirecting non-www to www url

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

Add a Comment

Your email address will not be published. Required fields are marked *

2 × 3 =