Set Your Preferred Domain Name in Google Webmaster Tool

How Set Your Preferred Domain Name in Google Webmaster Tools

In Blogging by Fathi Arfaoui9 CommentsLast Updated: March 18th, 2018

Your domain name is the first thing that you need to set up, before creating your blog or site. That will affect your indexed pages if you forget to configure it. Your website domain has two versions, and without the (www).

People forget sometimes that Google will index their pages for different domains, this will risk their long-term page indexing. That way, they lose page ranking because the indexed pages will be divided between two domains, instead of one.

Why Setting a preferred domain name?

How many backlinks you have to your blog? Do you know the anchor text in these links?

Most of people who link to your blog, will use different domain names, with, and without the www. So, they link to different domain names, and this will affect directly your website ranking, for example, you will have two different Google page rank or the same domain name, of course to your domain name ranking will be much better with one single domain name.

At the same time, there is a risk that Google will mark some of your pages as duplicates content.

To set up your preferred domain name, you need to forward to, this way you get all the page indexed for your main domain name without problems. So you’ll redirect all your traffic to the same domain. To set your preferred domain name, just follow the next easy steps:

The first thing you need is to add your secondary domain name to your Google webmaster tools to verify your ownership. Just add your site as normal, and verify it as the main domain, now, you have verified the without the (www).

Sign into your Google webmaster tools account, click your site, then ”Site Settings” at the top right.

Set Preferred Domain Name

Now, all you have to do is to select, your ”main domain” as shown in the screenshot below.

Google Webmaster Tools

In this case, you have one domain name instead of two. Congratulations.

Important, Verify the site URL redirect

Please make sure to have one single domain and not two that can be accessed separately. If you can access your website URL with the naked domain, and with the full domain, then, you need to redirect one of them to your preferred domain that you’ve selected in Google webmaster tools.

To change your site URL, so that it redirect to one domain and not two, add the these codes to your ”wp-config.php” file in WordPress.


Of course, change the example of URL above with the one that you’ve selected as preferred. That’s the easiest way to do the job. However, if you need more options to change the URL in WordPress, then, check out this WordPress codex.

If you’re using other applications like Joomla or any other one, search for how to change the site URL for that software and you will find lots of tutorials online.

Please remember that Google will see all your incoming links even with www, or without it as the same. Thus, your domain will look as the majority of domains.

You can also define the full domain name for your blog from the beginning, it’s easy and all you have to do is select the protocol www with auto installers like Softaculous. At the same time, you can change your domain directly from your WordPress dashboard, but, it will cause problems, especially, if you’re a newbie.

There is no exact domain name structure to use, but, the majority of popular websites are using the full domain name instead of the short one. Some people believe that the full domain add some value to their SEO, some others believe the inverse.

If you type in your browse’s URL bar, you will be taken to, so remember this and make your website look professional when people type your URL address.

Anyway, you’ve learned how to set your preferred domain name and now, your links will redirect to the same domain and this is what you need after all. If you have lots of backlinks, then, this will add real value to your domain, you need one single address and not two of them.


  1. Hi Fathi,

    It’s important to setup the preferred domain name in Google webmaster tools, I know you can’t control how people link to your website but you can control how you build you own links to your domain name so you have to choose the domain name that you will be linking to the most. Thanks for sharing these easy steps to setup the preferred domain.

  2. Thanks for this solution. I have a problem regarding webmaster tools. I have selected my site with WWW but it want from me to verify it that I am the real owner of this site. How can I verify it?

  3. Hi, Fathi!
    how to test whether it is working or not?

    when I check Index status for preferred domain(with www). it is showing as “Total indexed pages 1” but for without www website indexed pages are in thousands. whether it is set properly or not? please reply

    1. Author

      Hi, Of course, if you’ve configured the preferred domain in the last 2 months or so, Google will not show you the right indexed pages for both versions. Just wait one or two months, then, check your indeed pages stats. Nothing is wrong with your case, it happens all the time because Google needs time to update your domain stat. By the way, you can delete the domain without ”www”, you don’t need it.

  4. Hello,Thank you Fathi, for your valuable suggestions and time.

    I have tried your solution. But on www version website ,icons/fonts are not displaying properly, I have contacted theme developers too, they suggested the same as you. But the problem is still there for,but icons/fonts are displaying properly on Safari browser.

  5. I have many doubts regarding these settings. as of now I am reverting back to previous settings. I will also ask on Google web master tools forum too.I will post my results and findings after I get reply from other web masters.

    Thank you.

Leave a Comment