cancel
Showing results for 
Search instead for 
Did you mean: 

Make filters seo friendly and add nofolow if more than 2 filteres are selected

Make filters seo friendly and add nofolow if more than 2 filteres are selected

Hi. i'm new to magento and i need to make filters url more seo friendly. ex : http://website.com/blugi-dama?culoare=13 to http://website.com/blugi-dama/color/red

also, i need to add nofolow tag if more than 2 filters are selected.  any idea or module? thanks 

3 REPLIES 3

Re: Make filters seo friendly and add nofolow if more than 2 filteres are selected

Hi @iubbbbbbb,

 

You won't get it using Magento OOTB but there are several paid modules that can help you.

Maybe you can start looking at https://marketplace.magento.com/

Re: Make filters seo friendly and add nofolow if more than 2 filteres are selected

if someone need fix..

for nofollow:

copy Head.php file (/app/code/core/Mage/Page/Block/Html/Head.php) to the local directory (/app/code/local/Mage/Page/Block/Html/Head.php)

Here is how to implement modification of the new file:

public function getRobots()
    {
        if (empty($this->_data['robots'])) {
            $this->_data['robots'] = Mage::getStoreConfig('design/head/default_robots');
        }

        //Added NOINDEX, FOLLOW for category page with filter(s)
        if(Mage::app()->getFrontController()->getAction()->getFullActionName() == 'catalog_category_view'){
            $appliedFilters = Mage::getSingleton('catalog/layer')->getState()->getFilters();

            //var_dump($appliedFilters);  //<-- uncomment and see filters as array in page source code in meta robots tag.

            if(count($appliedFilters) > 2){
                $this->_data['robots'] = "NOINDEX, FOLLOW";
            }
        }

        return $this->_data['robots'];
    }

url filters fixed with this module https://github.com/Flagbit/Magento-FilterUrls

 

Re: Make filters seo friendly and add nofolow if more than 2 filteres are selected

You can use SEO Meta tags templates module by FME. It allows you to automatically generate SEO friendly Meta titles, description, keywords & custom URLs. 

 

Check out more features here https://www.fmeextensions.com/meta-tags-generator-magento-2-extension.html

 

To add NoIndex NoFollow tag to any number of products, categories or CMS pages, use this extension. It allows you to use any combination of Index Follow tag.

https://www.fmeextensions.com/no-index-no-follow-tag-magento-2-extension.html

 

If you want an all-in-one SEO module, use the following. It will completely remove your SEO workload & cost. This module combines 7 small SEO extensions and will automate the process of generating SEO meta tags, canonical tags, Google rich snippets, NoIndex NoFollow tags, Image alt tags, Hreflang tag, and XML & HTML sitemap. 

https://www.fmeextensions.com/ultimate-seo-toolkit-for-magento-2.html