If you like SEOmastering Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

robots.txt and Wordpress

Started by itraider, 05-23-2010, 16:23:27

Previous topic - Next topic

itraiderTopic starter

What's your typical robots.txt file look like? I think it's good to get this done right at the start to make sure only relevant pages get indexed.
The virtual robots.txt that gets generated does not really exclude the admin related pages.
  •  


aprilhomer

#1
A typical robots.txt file for a website may look like this:
```
User-agent: *
Disallow: /admin/
Disallow: /private/
```
In this example, the wildcard "User-agent: *" applies to all web crawlers, and it instructs them not to crawl the "/admin/" and "/private/" directories.

It's important to use the robots.txt file to exclude any pages or directories that should not be indexed by search engines. This can help prevent sensitive information from being exposed through search engine results and ensures that only relevant pages are indexed.

If the virtual robots.txt file is not excluding the admin related pages, you may need to manually edit the file to include the appropriate instructions for disallowing those pages. Once the robots.txt file is properly configured, web crawlers will respect the directives and avoid indexing the specified content.

here's an extended example of a robots.txt file:

```plaintext
User-agent: *
Disallow: /admin/
Disallow: /private/

User-agent: Googlebot
Disallow: /images/

User-agent: Bingbot
Disallow: /secret/
```

In this example:
- The wildcard "User-agent: *" applies to all web crawlers and instructs them not to crawl the "/admin/" and "/private/" directories.
- The specific instructions for Googlebot and Bingbot further customize the crawling directives. In this case, Googlebot is disallowed from crawling the "/images/" directory, while Bingbot is disallowed from the "/secret/" directory.

These rules help to control which parts of the website are accessible to search engine crawlers. It's important to note that while the robots.txt file can guide search engines on what not to index, it is not a foolproof method for preventing content from being accessed. Additional security measures may be needed for sensitive information.


Here's an extended example of a robots.txt file that includes additional directives:

```
User-agent: *
Disallow: /admin/
Disallow: /private/

User-agent: Googlebot
Disallow: /search/
Allow: /search/about
Allow: /search/static

User-agent: Bingbot
Disallow: /private/
```

In this example, specific instructions are provided for different web crawlers. The "*" wildcard applies to all crawlers, and it instructs them not to crawl the "/admin/" and "/private/" directories.

For the Googlebot, the "/search/" directory is disallowed, but specific subdirectories like "/search/about" and "/search/static" are allowed. This allows for more fine-grained control over what Googlebot can and cannot index within the "/search/" directory.

For the Bingbot, the "/private/" directory is disallowed.

Here's an additional example of a robots.txt file with more directives:

```
User-agent: *
Disallow: /admin/
Disallow: /private/
Disallow: /checkout/
Disallow: /user/account/

User-agent: Googlebot
Disallow: /search/
Allow: /search/about
Allow: /search/static
Crawl-delay: 5

User-agent: Bingbot
Disallow: /private/
Disallow: /user/

Sitemap: https://www.example.com/sitemap.xml
```

In this extended example, we've added more specific disallow directives to exclude the "/checkout/" and "/user/account/" directories from all web crawlers. This helps prevent sensitive information related to user accounts and checkout processes from being indexed.

For the Googlebot, a "Crawl-delay" directive is included with a value of 5, indicating that Googlebot should wait 5 seconds between successive requests to the website. This can be a helpful way to manage server load and ensure that the website remains responsive during crawling.

For the Bingbot, additional specific directives are provided to disallow the "/user/" directory in addition to the "/private/" directory.

Finally, a "Sitemap" directive is included to specify the location of the website's XML sitemap, which can help search engines discover and index content more effectively.

By customizing the robots.txt file with these directives, you can control how different search engine crawlers interact with your website, protect sensitive information from being indexed, and improve overall indexing efficiency.


If you like SEOmastering Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...