Magento robots files are written and judged to be a navigation category page

Source: Internet
Author: User

Magento is the shop system, we highlight is our products, so, there are many paths we do not want to let the search engine index, so we need to use robots file to limit

The following is the contents of the robots.txt inside of the Magento, because many URL rewriting and pseudo-static, so, do not copy using, this format is for the Magento version of the Thor

User-agent: *
Disallow:/home/
Disallow:/catalogsearch/advanced/
Disallow:/catalog/
Disallow:/sendfriend/
Disallow:/catalogsearch/
Disallow:/checkout/
Disallow:/customer/
Disallow:/directory/
Disallow:/index/
Disallow:/newsletter/
Disallow:/developertoolbar/
Disallow:/index.php/
Disallow:/default/
Disallow:/skin/
Disallow:/*?

Explain:

Magento Home Page selected is home, so www.sample.com/home is accessible, but there is no meaning, and the page is also a problem, if the search engine, let customers come in, a look at the problem, immediately shut off, affect the image, so need to prohibit

Because many of the dynamic URLs of the Magento are pseudo-static, the dynamic URLs with? Can be disabled for indexing

index.php/this path and URL rewrite URL are accessible, will cause a page multiple URLs, unstable URL is very deadly, so to put this off!

The rest of the explanation, when your site is Google included, will find a lot of pages do not want to be included, at that time, you summed up, those pages need to be banned.

In the Magento category page, when a page is set to a page with navigation, we need to determine whether the page is a navigation page

The way to determine whether or not to navigate a page is:

$_category = $this->getcurrentcategory ();

Echo $_category->getisanchor ();

The output is 1, the description is the type of category sidebar with navigation, if the output is 0, the description does not have navigation, ok!

Magento robots files are written and judged to be a navigation category page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.