Technique

How to keep your test site out of Google

Put your website online from €9 per month

Free migration. We move your site and help you over WhatsApp, every day from 9:00 to 21:00.

In short

  • A copy of your site that ends up in Google causes duplicate pages and visitors who land on the wrong site. Always keep your test site out of the search results.
  • There are three layers: noindex (do not list), robots.txt (do not visit) and a login (not reachable). One layer can drop away for all kinds of reasons, so combine them.
  • At Klappe Hosting we set up several layers for your Test site, including a login with a code by e-mail. That way the copy never appears in Google.
  • Check it yourself with a search on site: and with the page source of your test site. It takes a few minutes.

You make a copy of your website to try something new. A few weeks later you search for your company name and see two results: your real site and the copy. This happens more often than you think, and it is easy to prevent. In this article you read why a test site belongs outside Google, which ways there are and how to check it yourself.

Why a test site does not belong in Google

A test site is a copy of your live site. Everything is there twice: the same texts, the same photos, the same products. If that copy appears in the search results, this is what happens.

  • Duplicate pages. Search engines see the same content twice. They do not know which version to show, and sometimes they pick the copy.
  • Visitors on the wrong site. Someone clicks a search result and lands on the test site. It may show a half-finished design, a test product or an old price.
  • Customers ordering on the wrong site. An order on the test site never reaches you as a real order. The customer thinks everything is fine and you hear nothing.
  • Mess in your statistics. Visits to the test site spoil your figures about how your real site performs.

A test site is there to try things calmly. Visitors should never notice it.

The three ways to keep a test site out of Google

Noindex: do not list this page

Noindex is an instruction that sits on the page itself, meant for search engines. In plain words it says: “Do not list me in your search results.” Search engines generally follow it. In WordPress the matching setting is called “Discourage search engines from indexing this site”.

Robots.txt: do not visit these pages

Robots.txt is a small text file in the main folder of your site. It asks search engines not to visit certain pages. It is a request, not a lock. Search engines read the file and usually follow it. But if another site links to your test site, the address can still become known.

A login: only with permission

With a login, the pages only become visible after you enter a password or code. This is the strongest layer. A search engine cannot log in, so there is nothing to list. And visitors who land on the address by accident only see the login screen.

Why one layer is not enough

Every layer has a weak spot.

  • A noindex setting in WordPress is one tick box, on or off. Switching it off by accident is easy, for example when someone prepares the copy for a presentation.
  • Robots.txt is a request. A link from outside can still make the address visible.
  • A login can be forgotten once, especially if you work with a manual solution that you have to set up yourself.

Use them together and one layer catches what another misses. The login keeps the content hidden, noindex and robots.txt tell search engines what you intend. If one drops away, two remain.

What Klappe Hosting arranges for you

With our Test site you do not need to set anything up for this. We put several layers around your copy.

  • A noindex instruction is sent with every visit to the test site, also on pages you create yourself. You cannot switch it off by accident.
  • A robots.txt asks search engines not to visit anything.
  • A login with a code by e-mail. Only you and the people you invite can open the test site. You log in with a 6-digit code, so there is no password to remember. If you open the test site from My account, it takes one click. If you choose “everyone with the link” in the settings, noindex and robots.txt stay active.

A bar on the test site shows that you are on the test site. That way you always know where you are working. You can read more about how the test site works on the WordPress staging page and in What is a WordPress staging site.

How to check it yourself

You do not have to take our word for it, you can see it in a few minutes. This works for any test site, also when the copy lives somewhere else.

  1. Type site: in Google followed by the address of your test site, for example site:staging.yourdomain.com. If you see no results, the copy is not in Google.
  2. Open a page of the test site, right-click and choose View page source. Search for noindex. You find a line that asks search engines not to list the page.
  3. Add /robots.txt to the address of your test site. You see a line that asks search engines not to visit anything.
  4. Open the test site in a private window of your browser. You see the login screen and not the pages themselves.

Check this again after a big change, for example after you tried a new design. A short check takes a few minutes and saves a lot of trouble.

Is your test site already in Google?

It can happen that a copy is already listed. This is what you do then.

  • First set up the protection properly: noindex and a login.
  • Open Google Search Console, choose Removals and ask to remove the addresses of the test site.
  • Wait a little. Google has to visit the page again before the removal shows.
  • After a few days, check again with site: whether it worked.

Is the copy not with us? This works just the same. Send us a message if you get stuck, and we will take a look.

A test site without worries about Google

A copy of your site should be a safe place to practise. With the Test site of Klappe Hosting you create it with one click, it stays out of Google and only you and the people you invite can get in. You see the price on the pricing page and you add the Test site via the order form. Want to try a new PHP version safely? Read Upgrade your PHP version without risk.

Frequently asked questions

What is the difference between noindex and robots.txt?

Noindex is an instruction on the page itself: do not list me in the search results. Robots.txt is a file that asks search engines not to visit pages. They are two different signals, and they work best together.

Should I protect the test site with a password or login?

A login is the strongest layer, because search engines and visitors then do not get to see the pages. On our Test site you log in with a 6-digit code that we e-mail to you.

My test site is already in Google, what now?

First set up the protection properly, with noindex and a login. Then ask Google Search Console to remove the addresses. If you get stuck, send us a message.

Can a search engine still find my test site?

A search engine follows links. If a link to your test site exists somewhere, the address can become known. That is why you combine several layers: the login keeps the content hidden, even if someone knows the address.

Read next

Ready to put your website online?

Order Website from €9 per month, or send us a WhatsApp message first.