How to Redirect a Non-WWW Domain To A WWW Domain

Ron KestingRon Kesting
Ron Kesting

How to Redirect a Non-WWW Domain To A WWW Domain

When it comes to www vs. non-www domains, there are benefits to redirecting a Non-www Domain to a www domain. Today we will look at some of these benefits, but first, let us look at what a non-www URL is and how to set up a www redirect.

What Is A Non-WWW Domain?

A non-WWW URL is a domain without the www prepend. So instead of, visitors would type in or to get to the website in question. 

A website without the www prepend often gets called a “naked domain.” The DNS zone for the “naked domain” is called an apex record.

What Is The Purpose of the WWW Prepend?

The “www” prepend stands for “worldwide web.” In the early days of the web, "www" was used as a subdomain. The “www” subdomain lets users know that a website is a part of the web and not, for example, FTP – another part of the internet. 

The www prepend became a tradition and a means for server companies to show the type of services that they offer.

How To Redirect A Non-WWW Domain To A WWW Domain

A naked domain redirect is possible through a “301 Redirect.A “301 Redirect” is a permanent redirect that tells search engines that and where it has been relocated to. 

The “301 Redirect” tells search engines that even though you have two URLs sending traffic to the site, all site operations now take place on the new domain.

The benefit of using a “301 Redirect” is that the search engine ranking of the naked domain remains intact and connects to the “www” domain.

Manually Adding a 301 Redirect

Manually adding a “301 Redirect” comes with inherent risks because you are making changes to the .htaccess file of your domain – something that could go terribly wrong if you are not confident in what you are doing. The .htaccess file controls your site configuration and one misspelling or a missed symbol, and you are looking at a very messy situation!

Adding the following code to the .htaccess file on your Apache server should create a 301 redirect:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^
RewriteRule (.*)$1 [R=301,L]

Just replace the “” in the code above with your URL.

Setting up a 301 redirect manually varies depending on the server setup, and each web server handles this process differently. It is also worth noting that this process is further complicated by the need for an SSL certificate for the non-www domain URL as well, unless a SAN SSL certificate is set up. All of these moving parts make it much more likely that something will go awry, so it is always best to follow up with your host directly or use a risk-free 301 redirect instead.  

Avoiding Risk And Adding a 301 Redirect

The easiest and most efficient method of redirecting a named domain to a “www” domain is to use a redirect service like

To set up a 301 redirect with is as simple as adding a source URL and a destination URL and letting the redirect service take care of the rest! This method of URL redirecting can be preferred because it eliminates the possibility of overriding your site’s .htaccess file.

Another benefit of using a redirect service like is that redirects are much easier to manage. Rather than sifting through a .htaccess file, managing redirects is simple on the clean user interface.

The Benefits Of Using a “301 Redirect Service”

Depending on the 301 redirect service you select, redirect tools also offer a range of other benefits that can help you to optimize your website function.

One of the most helpful tools offered by is the Analytics feature which monitors and reports detailed statistics. By tracking these analytics, you can determine what percentage of your website visitors are stalled and visiting the naked domain rather than the new one (www). This information can also tell you where those site visitors are coming from so that you can locate and correct the linking URL to match the new www domain. 

Another incredible benefit of using a redirect option like is that it also has an automatic HTTPS redirection. Through automation, sets up an  SSL certificate for each of your domains so that any redirects that you set up allow for both “HTTP” and “HTTPS” redirection. This automation makes overall site function and domain redirection easier by eliminating the need for users to manage this element of hosting since handles it all externally. With just one DNS change, eliminates the need for SSL and alias management!

Why Redirect A Non-WWW Domain?

Although the “www” prepend is not absolutely necessary, there are some situations where site owners may want to incorporate it into a website URL. 

Cookie Simplicity

Using subdomains for different website sections makes cookie handling more efficient and results in better site performance since static content does not send cookies each time content is loaded.

Tradition and Trust

Many web users are unfamiliar with why we use the “www” prepend, but they are so used to the tradition of seeing it, they may be less trusting of sites without the “www” prepend.

Does URL Affect SEO Ranking?

In the past, Google has suggested that websites using the “www” prepend are favored by search engines. More recently, however, Google has stated that URL is a “very, very” lightweight ranking factor.” This appears to apply to keyword incorporation in URLs, however, and the general consensus is that the use of the “www” prepend does not influence SEO ranking.


Although mostly considered a cosmetic tradition, there are some advantages to using the “www” prepend for your domain. If your site does not currently direct surfers to a “www” URL, redirection is as easy as adding the original URL and the redirection URL to a URL redirect tool like! 

Pricing Background
Domain redirects delivered hassle-free

Get started right away

  • Free plan
  • No creditcard required

Read more