Redirect www to http// (www.abc.com to http://abc.com)

Today, we are showing you a way to redirect your homepage url by removing the www from the front, and instead it will go like http://abc.com. There are few benefits of doing it like

  • avoiding duplicate content in Google, but it’s not that rampange,
  • split page rank and removing www from a site url makes it look cool.

To do it, you have to paste a code. Below is the code, paste it in .htaccess file found in “/public_html” directory.

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

Copy the code and paste it above # END WordPress, see the image above. Just replace the domain name.

If you want to read more about url-canonicalization, here is a excellent post written by Matt Cutts on the topic.

RELATED POSTS: 

  1. Redirect URL using .htaccess
  2. How to remove URLs from Google Search or Google Cache via Google Webmasters?
  3. Redirect Error 404 page to homepage automatically
  4. How to create a good Robots.txt file?
Stay in touch with us on Facebook or Twitter or Google+ to keep yourself updated on stuff related to the world of Technology.


Comments