Forwarding www.yourdomain.com to yourdomain.com from cPanel

Add following in .htaccess file following:

Options +FollowSymLinks 
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^yourdomain\.com
RewriteRule (.*) http://yourdomain.com/$1 [R=301,L]

 

Replace [yourdomain] and  [com] to your real domain and extension in line 5 and 6.

What's the advantage of merging those two URLs?

It's good for pagerank !!! (It will not split visitors.)

  • 26 Users Found This Useful
Was this answer helpful?

Related Articles

Steps to Setup Node.js for Web Applications Using End User Interface

Node.js is an open source server environment that runs on various platforms (Windows, Linux,...

How You Can Easily Install Auto SSL Certificate In Your Website

Here is how to initiate an AutoSSL check from your cPanel account. Step1:  Log into your...

How to trace route | Running a Traceroute

Running a Traceroute Take the following steps to run a traceroute in Microsoft® Windows®:...

My website is not opening or Cannot see my site? What could be the issue?

There are several reasons why you might not be able to view your site. We have listed the most...

How do I add a subdomain?

1) Log into your cPanel.2) Click on the "Subdomains" icon.3) Type in the subdomain you wish to...