How to remove www from url through htaccess. Suppose, if a user type http://www.example.com (example is the name of your domain) in their browser, you can automatically redirect them to http://example.com.
For website SEO (Search Engine Optimization) purpose, it is necessary that your blog or website either respond to http://www.example.com or http://example.com, but not both. Otherwise, search engines see duplicate content on the www and non-www domains, and may downgrade the site ranking.
In my previous posts, I have explained htaccess file and their importance. In this post, We will learn how to remove www from url through htaccess.