简体   繁体   中英

How to fix LONG urls in magento for Layered navigation. SEO Practice

According to some SEO Practices having long URL is not good.

Magento uses layered navigation and when you have lots of attributes then the URL becomes very very long.

I can not put an URL here because the moderatos say its too localized.

I just wanted to know if this is possible to fix using any kind of code? As I am not an expert on magento or php, I can not provide any code because I dont even know where should I start looking for to fix this.

Somebody suggested editing filter.phtml and put rel=nofollow.

Is it a good practice? Is it recommended that search engines dont crawl those pages that are related to layered navigation? Another problem they have is that the title and description its always the same.

Thank you very much for your post, for help I created a module that solves this error.

https://github.com/jruzafa/Devopensource_LayerCatSeo

Actually, the big number of URLs is the bigger issue than the length of these filter URLs:

Please see the answer from here as copy below, with the solution to fix SEO issues caused by the huge number of layered navigation URLs.

Hiding something from Google (or trying to do so) based on Session/Cookie/User-Agent is never a good idea. Google does not like to be cheated but wants to see the site just like any other visitor.

robots.txt, rel=nofollow etc. also do not fully fix this issue or have at least some downsides or limitations.

A better and more elegant solution for hiding layered navigation for crawlers and fix SEO issues caused by the huge number of layered navigation URLs would be using PRG Pattern .

This works like a charm, ie not changing the UX regarding Layered Navigation and 100% reliable in terms of preventing crawlers from wasting crawl budget on useless duplicate content URLs.

Simply said, it's about replacing the GET request to a layered navigation/filter URL with a POST request (which search engine crawlers do not follow) before redirecting the user to the original layered navigation/filter URL.

For further details and reading, please see

  1. Detailed explanation incl. sample request flow
  2. Why robots.txt, rel=nofollow etc. are no satisfying solutions here
  3. PRG Pattern Magento 2 Extension
  4. PRG Pattern Demo

This is the technical solution:

  1. Copy filter.phtml from app/design/frontend/base/default/template/catalog/layer to the equivalent directory in your site's theme.
  2. In the anchor tag there (should be only one) add a rel="nofollow" attribute.

However, I would expect first that a SEO expert tell us if this should be done this way or not.

You might also consider using a rel="canonical" to point back to the main category that lists all of your products, that way more "juice" is sent back to that page for ranking.

More on that here: http://www.google.com/support/webmasters/bin/answer.py?answer=139394

Another solution would be to add the site to Google Webmaster Tools and then adjust how Google treats certain query string variables. By default, Google (and presumably others) examine pages with certain query string variables and try to determine if the page is different enough to rank separately or only rank the most relevant page.

Why don't you read YOAST Magento SEO article? YOAST Magento SEO

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM