How to Remove WWW From Your WordPress Domain

Written by | Date Updated: January 20, 2020

remove-www-wordpressIn this article, we’re going to show you how to remove the www prefix from your WordPress domain.

And, just as importantly, we’ll talk about why you may want to do this and what the ramifications may be. For instance, will you lose all of your current traffic?

As we get started, let’s get you setup with a quick table of contents so you can jump to the exact section you need.

How to Remove WWW From Your WordPress Domain

It is very simple to remove the WWW from your WordPress domain name.

We can do it in two quick steps:

1.)  In your WordPress dashboard, click on Settings | General to get the window you see below:


2.)  In the WordPress Address & Site Address dialog boxes, remove the www.

I know.  Crazy right?  That’s literally all it takes to remove the www prefix in the URLs on every page of your WordPress domain (this is also where you upgrade your WordPress site to HTTPS).

But let’s take a look at what your motivations may be:  Why you should (or shouldn’t) be doing this…

Why You Should (or Shouldn’t) Remove the WWW From Your Domain

If I am starting out a new domain, I now always choose the non-www version.  I just think it makes the URL shorter and thus look better.

As for SEO, “Google has no preference for whether you use www or not“.

There are some technical ramifications which may have an impact if you have a large website that uses cookies and sub-domains.  For this reason, Bjorn Johansen concludes that “there are important matters that suggest you should use the full hostname with the www: Perfomance-wise, security-wise and in terms of flexibility.”

It could be for this reason that domains such as Amazon, Nike, and Microsoft all still use the www prefix in the domain URL.

Also, most experts suggest that you should not switch if you have been with the www version for a long time, which all of the above companies have.

Regardless, as many have discovered after they take our Free SEO Domain Evaluation, you need to have your redirection setup properly.  This means that if your website visitor puts in WWW, and you are setup not to use WWW, you should seamlessly redirect all users to the proper place.

We look at how to do this redirection below.

What Are the Ramifications of Removing the WWW: Will You Lose All of Your Existing Organic Traffic?

The short answer is “no” if you do it right.  But what does that mean?

It means that you need to redirect all WWW traffic properly. In many cases, WordPress and associated plugins you may use will do this automatically. After this, you will want to use URL inspection tool to get your updated URL structure immediately indexed in Google

You can test it after you make the change above.  Simply add the www and see if you get automatically redirected to the non-www version.

However, there have been cases in which WordPress or an associated plugin did automatically redirect at first.  But then, after an update, the redirection did not work.

So, just to be sure that your redirections will always work, I would recommend the following update to your .htaccess file:

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

This will tell the search engines to permanently redirect the www version to the non-www version. To verify that you have properly redirected your content, I recommend this tool.

Conclusion: Removing the WWW From Your WordPress Domain URL Structure Domain

As stated above, I prefer not to use the www prefix when setting up my domain in WordPress. Perhaps I’m a sucker for cleanliness and minimalism in URL structure?

But there are 2 situations in which you may not want to do this:

1.) You’ve had the WWW version for a long time — no sense in risking all the good will you’ve built up overtime with the WWW.

2.) You have a large site with many sub-domains.

But the most important consideration is this: When a user visits your site with or without the WWW, they should land on the proper page because you have correctly setup your redirection!

For any questions/discussions, hit me up in the comments below 🙂

Richard Cummings

Director of SEO, Social Media, and Web Content Development at The SEO System
Richard Cummings has been practicing online marketing for many years and has setup and optimized hundreds of WordPress sites.He founded The SEO System to provide SEO, social media, and online marketing services and software to businesses.
Richard CummingsHow to Remove WWW From Your WordPress Domain