4

Hello i have a multistore multidomain prestashop installation with main domain example.com and i want to block all bots from crawling a subdomain site subdomain.example.com made for resellers where they can buy at lower prices because the content is duplicate to the original site, and i am not exacly sure how to do it. Usualy if i want to block the bots for a site i would use

User-agent: *
Disallow: /

But how do i use it without hurting the whole store ? and is it possible to block the bots from the htacces too ?

2 Answers2

1

Regarding your first question: If you don't want search engines to gain access to the subdomain (sub.example.com/robots.txt), using a robots.txt file ON the subdomain is the way to go. Don't put it on your regular domain (example.com/robots.txt) - see Robots.txt reference guide.

Additionally, I would verify both domains in Google Search Console. There you can monitor and control the indexation of the subdomain and main domain.

Regarding your second question: I've found a SO thread here which explains what you want to know: Block all bots/crawlers/spiders for a special directory with htaccess.

Community
  • 1
  • 1
0

We use a canonical URL to tell the search engines where to find the original content.

https://yoast.com/rel-canonical/

A canonical URL allows you to tell search engines that certain similar URLs are actually one and the same. Sometimes you have products or content that is accessible under multiple URLs, or even on multiple websites. Using a canonical URL (an HTML link tag with attribute rel=canonical) these can exist without harming your rankings.

qwertzman
  • 784
  • 1
  • 9
  • 23