Latest Blog Posts

Editing the OpenCart Homepage
29.09.2025 2665 3 44 min

Editing the OpenCart homepage, customizing H1 and Title text, displaying products and modu..

How to Uninstall Powered by OpenCart
03.09.2025 4134 3 20 min

Remove Powered by OpenCart and customize footer: edit template, use theme editor or OCMOD ..

How to remove modules in OpenCart
28.08.2025 2114 3 12 min

Step-by-step instructions for deleting modules in OpenCart 3 via the admin panel, manually..

Which hosting to choose for OpenCart
25.08.2025 1432 3 19 min

Find out which hosting to choose for an OpenCart online store. Requirements, selection cri..

How to block products from indexing in OpenCart

1817 1 1 min
How to block products from indexing in OpenCart

To block products from indexing in OpenCart, you must first make changes to the controller that are responsible for displaying products. This can be done by adding a special meta tag <meta name="robots" content="noindex, nofollow"> to the HTML code of product pages.

Let's look at it step by step:

  1. Open the product controller file at catalog/controller/product/product.php
  2. Find the index() method and add code to it that adds the "robots" meta tag. It will roughly look like this:

 public function index() {
 $this->load->language('product/product');
 // Your code for loading product data
 $this->document->addMeta('robots', 'noindex, nofollow');
 // The rest of the index() method code
 }

Go to your store's product page and make sure the <meta name="robots" content="noindex, nofollow"> meta tag is present in the page code.

Products related to this post

Robots meta tag for service pages
699 грн.499 грн.
The "Robots" META tag allows you to tell search bots whether this page can be indexed and whether links provided on the page can b..
Automatic Meta tags for products, categories
699 грн.499 грн.
A module that allows you to set up template meta title and description tags on site pages. Connects to product and category pages,..
Robots meta tag manager
699 грн.499 грн.
NoIndex NoFollow is a handy SEO tool for adding pages to your site that should be excluded from indexing or indexed on a priority ..
ChatGPT Consultant

Comments

Leave your comment or question
Есть еще какие-то способы кроме этого?
Answer Admin

Конечно, давайте разберем, как закрыть товары от индексации в OpenCart. Основной способ — это добавление специального метатега "robots" в HTML-код страниц с товарами. Для этого нужно внести изменения в файл контроллера товаров. Откройте файл catalog/controller/product/product.php, найдите метод index() и добавьте строку, которая создаст метатег "robots" со значением "noindex, nofollow". Это подскажет поисковым системам не индексировать эти страницы.

Также, помимо этого, есть несколько других методов:

  1. Файл robots.txt: Вы можете настроить этот файл, чтобы запретить индексацию страниц товаров. Откройте файл robots.txt в корневой директории сайта и добавьте строку Disallow: /index.php?route=product/product&. Это заблокирует индексацию всех страниц товаров. Но нужно учитывать, что этот способ сработает только если у вас адреса страниц без ЧПУ.
  2. SEO модули: OpenCart поддерживает различные SEO модули, которые упрощают управление индексацией. Они могут автоматизировать процесс и предложить дополнительные настройки для оптимизации.

Write Comment

Popular