404 errors with {{handle}} in the URL

Broken link using SEMrush with {{handle}} in the url.

Written By Stephen Gardner (Super Administrator)

Updated at June 7th, 2020

Your AMP Related Products code contains AMP-Mustache syntax (https://amp.dev/documentation/components/amp-mustache/). This is how AMP fills in content based on a dynamic endpoint.  AMP-Mustache uses curly brace syntax to represent variables, such as {{product.handle}}. SEMrush incorrectly parses this syntax before it is filled in.

Diagnosis

If you receive an error for a 404 or broken link containing something such as {{handle}}, this is not a true 404, but rather a bug in how SEMrush's audit parses AMP templates.  It is not a true error.  To test this, you can click your related products on an AMP page to verify that no 404s occur.  

If you are still concerned by this, you can remove your related products, and SEMrush will no longer incorrectly parse that link.  

Removing "Related Products" (if you wish)

As mentioned, this is a bug in how SEMrush parses AMP templates.  And the error can be safely ignored.  If, however, you want to remove related products, you can do this:

  1.  Navigate to your themes dashboard here: https://shopsheriff.com/account/amp/admin/themes
  2. Click on "Customize"
  3. Select "Products" from the top dropdown
  4. Remove your related products from the left-hand column.

Was this article helpful?