You’ve likely been an Internet user for a while now, so you might have noticed that certain websites start with www and some don’t. Most people think that these two are pretty much the same – but there are a few differences. If you’re setting up a website on a www subdomain and you’re wondering how to redirect it to a non-www one, you’re at the right place. We’ve covered everything you must know about this topic. First, we’ll discuss some differences between www and non www URLs – and then, we’ll show you how to set up a redirect from your www website to a non www address.

Are There Any Differences Between WWW And Non WWW Domains?

A website that doesn’t start with a WWW is usually called a naked domain. Websites that have a WWW in their address act as a hostname.

Even more so, WWW websites could have several subdomains attached to them. When the Internet was in its infancy, 99% of websites had their URLs start with WWW – and that acronym was just another sub-domain.

As time went by, people gradually stopped typing in the WWW when they visited a website. That was noticed by webmasters – which led to many websites ditching the “WWW” from their URL.

Here’s what that means in plain English:

There’s not much practical difference between a www and a non-www URL. It’s all about your or your brand’s preference. However, there are a couple of technical differences between these two.

For starters, www websites can adjust to DNS. With a www website, you can also restrict cookies if you’re utilizing multiple domains. That’s something a non www domain can’t do.

Another crucial thing you must remember here is that search engines see non-www and www domains as separate entities. Be careful if you redirect non www to www or vice versa; it could cause duplicate content issues.

Should You Redirect WWW To Non WWW?

Now that you’re more familiar with notable differences between www and non www URLs let’s go over the pros and cons of using a non-www URL.

What Are The Pros Of Non-WWW URLs?

One of the significant pros of using a non www URL is that it’s easier to remember. That’s fantastic if you want to direct more traffic to your website.

People are also increasingly searching for websites without typing in the www part of the URL. That means that www domains might slowly phase out.

Using a non www URL also saves on precious bandwidth and character space.

And lastly, if you’re not planning on restricting your cookies, there’s no need to consider using a www domain.

What Are The Cons Of Non-WWW URLs?

There aren’t that many cons of using non www URLs – you only miss out on a couple of features that are inherent with www URLs.

For starters, you’re not able to restrict your cookies. It won’t impact your website if the subdomains you’re using are hosting images with the same domain, though.

Non-www URLs don’t have CNAME records, meaning you can’t redirect traffic from the server to the server.

The CNAME record is beneficial if a server gets overloaded because it allows you to redirect excess traffic to another web server.

If you’re hosting a website that does a lot of content delivery, it’s best to redirect to WWW URL.

How To Set Up WWW To NON WWW Redirect?

Now that you’re caught up with the whole www vs. nonwww debate let’s see how you can set up a redirect from a www to a non www URL.

Using cPanel?

One of the fastest – and easiest – ways to redirect www to non www URL is via cPanel.

First, log in to your cPanel and click on the Domains option on the main page. Then click on the “Redirects” option. You’ll see several options there.

Cpanel Redirect

We’ll walk you through each setting.

First, set the Type to Permanent 301. That sets up the website to send out a code that informs web crawlers and browsers that the website has been moved permanently.

Cpanel Redirect 02

Next, choose the main domain from the HTTP:// drop-down menu. Leave the path bard below empty because you want to redirect your entire domain.

Now, onto the Redirects option. Set it to your desired URL without the www part.

Lastly, you need to choose the www redirection. You’ll be presented with a number of radial options here. Choose the “Only direct with www.” option.

Once you’re done setting up the redirection options, hit the Add button – and you’re done.

If you’ve followed these redirections, you’ve successfully set up www to non www redirection on your website.

By Editing .htaccess Files

If you, by any chance, don’t have access to cPanel, you can set up www to non-www redirection by adding a few lines of code into the .htaccess file.

To edit the file, you need to fire up your FTP client of choice and go to the root directory of your website. Find the .htaccess file and download it.

Wp Filezilla Directory Htaccess

Next, edit the file in a text editor and add the following code:


RewriteEngine on

RewriteCond %{HTTP_HOST} ^www\.yourwebsitename\.com [NC]


RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]

 

Change the “yourwebsitename” to your domain name, and you’re done. All that’s left is to upload the edited file back to your website.

Now type in your domain name with the www prefix and see if you get redirected to the non www domain. If you’ve followed these steps, everything should be running as smooth as butter.

Conclusion – WWW Or Non WWW?

In conclusion, WWW domains come with a couple of extra features. However, these additional features are only necessary if you’re running a more extensive website with several subdomains and servers. If you’re running a small website, the choice falls on personal preference.

If you need help with setting up WWW to non WWW redirect on your WordPress website, contact our support team, and we will fix this in no time.