I want to make a copy of my Drupal 7 website to use for testing purposes.

Should I use another domain or do it locally?

I was planning to simply copy the site to a new domain because I understand how to do that.

But I don't want the copy to be indexed in search engines to avoid any issues with duplicate content.

I am not familiar with local Drupal installations, but if there are good reasons to go that route, I will learn.

So make the online site invisible or do it locally?

Thanks

Comments

f4o’s picture

If you want to use Drupal site for testing purposes, I suggest to install it locally. You will have a lot more freedom to do whatever you want.

If you are doing it for the first time, follow documentation instructions. It would be nice to learn along this process.

BTW, if you decide to install copy online instead, you can use robots.txt file in root folder to disallow search engine spiders to index your web. Just put this inside this file:

User-agent: *
Disallow: /
bhatmahesht’s picture

Many times it's useful to test online than local copy.
I was trying hard to do this. I did something like preview.mydomain.com for testing purposes which resulted in both mydomain.com and preview.mydomain.com both get indexed by google.

Thanks for the information about robots.txt. It's easy , but awesome.

--
Passionate about Drupal

Jaypan’s picture

Many times it's useful to test online than local copy.

Such as? Your browser cannot tell the difference whether the server is local or remote, they are functionally the same thing from the browser's perspective, so I'm not sure what types of situations you would be referring to.

ColdSun’s picture

There is no reason to test online instead of a local copy if you set up your local copy correctly. Your browser doesn't care as Jaypan said.

Additionally, with the hostname file, you can test multiple domains just as you could in an online fashion.

nichescholar’s picture

thank you. now i can try both :)

crumpeta’s picture

If you have a mac, you can always install it locally under your Sites folder. Then access it in a browser at http://localhost/~yourusernamehere/drupaldirectoryhere

nichescholar’s picture

Thank you, but I use Windows. I am using WAMP to learn PHP so something similar will probably work for me.

JamesOakley’s picture

I quite like using a subdomain to build development or test copies of a site. You can do it locally. One advantage of doing it on the internet is that you can use the same server that your final site will go on. That has the benefit that you can be sure that there are no differences in the two setups. It's also much faster to copy files between fast-connected servers than using (s)FTP or similar to upload from your local computer. (Of course, whether you develop locally or on a server, you need a proper strategy for replicating your test site across to the live one, but that's a whole other subject).

In terms of stopping the search engines spidering your test site, you can just password protect your test site. I'm not talking about Drupal logins, but more basic webserver-level password protection. cPanel has a "password protect directories" feature; you can do it yourself with .htaccess if you prefer. HTTP authentication is not particularly secure, but if your main reason is to keep out the search engines it will work well for you.


This signature is currently blank