Using a wordpressbuilt blog, you can use the robots.txt file to restrict the search engine from capturing some directories and files. There are roughly the following methods.
The simplest open Writing Method
Without any restrictions, the link structure in the WordPress site is reasonable. As a general blog, it is enough to be fully open. Code:
Allow all Spider access and allow access to all content. This method is recommended as long as the link design in the template is reasonable and there is no special content to be restricted.
The simplest and most rigorous Writing Method
Disallow:/*. php $
Disallow:/*. inc $
Disallow:/*. js $
Disallow:/*. CSS $
Disallow :/? S =
Limit file to capture search results.
Disallow:/WP-* will be restricted together with the attachment directory. If you want the search engine to capture the content in the attachment, remove the # comment in the third line. Not all search engines Support allow.
The most reasonable way to write
I also think that robots.txt is the most reasonable.
Disallow :/? S =
Allows All search engines to crawl, list directories one by one, and restrict the crawling of search results.
Contains the sitemap. xml address (this Viki has a special description, but the Google administrator tool will prompt 'invalid sitemap reference', the validity is still controversial ).
Other statements of robots.txt
To avoid repeated pages in search engines, WordPress players have created many robots writing methods and listed some common ones as a reference (for permanent links in pseudo-static mode ):
# Restrict the capture of WordPress pages
# Restrict the paging of the captured category
# Restrict tag capture page
# Restrict the capture of trackback content
# Restrict crawling of all categories
Finally, we recommend that you use the Google administrator tool to log on and access "tools-> analysis robots.txt" to check the file validity.
Author: Yan sishu
Original article: wordpressboke robots.txt
Copyright. The author and original source must be indicated in the form of a link and this statement must be retained.