How to 301 Redirects Non www to www htaccess Rewrite-
1. Download the .htaccess file from your website’s root web folder to a folder on your machine where you can edit it.
2. Make a copy of the .htaccess file and save it somewhere else for safe keeping in case you need to revert to the old version – do not edit this version.
3. Open the original .htaccess you downloaded in Notepad
4. Add the following code (in red) into the .htaccess file. Be sure to substitute “example.com” with your own website information but touch nothing else.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
5. Upload the file back to your website in the exact same place you downloaded it.
6. Once the upload is complete open a browser and try visiting the “non-www” version of your website address. If the .htaccess is working as it should you will be redirected immediately to the proper “www” version of your website. This will be reflected in your browser’s address bar.
7. To be 100% certain this has worked appropriately
If you want more update/ information about google seo, seo, search engine optimization call Seo Expert | Seo Freelancer- 9870565369 | email- srujanshinde@gmail.com | visit- www.freelancerseoconsultant.com












0 comments:
Post a Comment