Broken Links in Magento ®: Fixing Them The Right Way

How to find broken links? You may use special software called Xeno, webmaster tools of Google service or do it manually.

Locate the source of a problem

Naturally, the latter variant is the most complicated and time-consuming, first of all, due to the fact that you will need to check all site links manually.

The easiest and most reliable way is checking your site for broken links with the help of specific online services. There are several resources: Free Link Checker, BLC, Link Tiger, Link Checker and Dead Link Checker.

What harm do broken links cause? Sometimes a web store admin adds a URL into indexation and after that removes the content on that page. But the URL remains indexed and leads to an error page or to a hosting provider default page. This irritates customers and search engines a lot, most customers who go to a non-existing page will never come back.

Also, suppose there is a comment option enabled in the store, and all comments are indexed. A customer included their site URL into the comment text and after some time that site stopped working and became unavailable on the web. But the broken link remains on your store page.

Another possible reason – you decided to change the site structure completely, removed unnecessary figures in the URL or moved product(s) into another category. In this case, there may be broken links, however, they are self-removed as soon as a search engine robot checks your store.

GoMage Magento PWA Theme

How to fight them?

First of all, you need to find them, then launch any of the online services listed above using their instructions and check your site. Then, all broken links found need to be 301 redirected to correct pages, so that all customers who click a ‘bad’ link are taken to an existing page.

How to setup redirection

  • Go to System > Configuration;
  • In ADVANCED group section click Index Management;
  • Choose Index Options;
  • Click ‘Update’ and configure indexation;
  • Click ‘Save Config’.

Now launch redirection script. For this go to the root directory of Magento ® and locate the installation catalog. Add the following code:

PHP-е shell/url_migration_to_1_13.php –


Add ‘thread_count’ into the next line, this parameter is chosen according to flows of Magento ® being used. After successful launch you will be redirected to the configured root catalog, insert this line:

PHP-е shell/indexer.php –reindexall


This will start REINDEX.

After Reindex is complete, add the following code:

rm -rf var/cache var/full_page_cache var/locks


During the first days after this, the volume of visits on your site may significantly reduce because some links will be removed from Google indexation. But after the search engine robot checks your site again, the links will be replaced with the correct ones, so no need to worry. Moreover, SEO specialists have determined that Google will gladly give you more PR points if all categories on your site are configured correctly. If you want to create the site from the very beginning, you should choose specialists for this work with excellent development experience in Magento ®.

Contact us
Fill in the data using social media accounts
Thank you!
We will contact you shortly
Subscribe to Newsletter Learn the main secrets of creating a successful eCommerce project