CMS-General

Troubleshoot issues with AMP

Last updated: November 20, 2018

Applies to:

Marketing Hub
marketing-basic-pro-enterprise
Professional, Enterprise
Legacy Marketing Hub Basic

If Google Search Console reports issues with your AMP pages, the first thing to do is check the AMP validatorThis tool provides descriptive error messages on validation errors, and pinpoints exactly where the error is.

Make sure to enter the AMP version of the URL (with the param hs_amp=true) into the URL field. To find the AMP preview URL on a blog post:

  • In your HubSpot account, navigate to Marketing > Website > Blog.
  • Click on the name of a blog post.
  • Click View details.
  • On the slide-in panel, you'll find the AMP preview URL.

AMP%20preview

In most cases, the invalid HTML is within the blog post content and needs to be fixed manually. To fix these issues in the blog post editor:

  • In your HubSpot account, navigate to Marketing > Website > Blog.
  • Hover over the blog post that's returning the error and click Edit.
  • Click the post body of your blog post and make the necessary changes. You may need to make edits in the source code to modify the HTML to validate your content.

source-code

Some of the most common issues you're likely to run into with AMP are as follows:

  • The attribute 'style' doesn't appear in <div> tag: this is almost always due to a Wistia embed code, which is not yet natively supported in AMP pages. HubSpot has plans to add automatic support for them in HubSpot AMP pages in future.
  • The <script> tag is disallowed except in specific forms: this is almost always due to a Wistia embed code, which is not yet natively supported in AMP pages. HubSpot has plans to add automatic support for them in HubSpot AMP pages in future.
  • The 'style' attribute doesn't appear in the <span> tag: this is almost always due to a Wistia embed code, which is not yet natively supported in AMP pages. HubSpot has plans to add automatic support for them in HubSpot AMP pages in future.
  • Malformed URL '...' for attribute 'href' in <a> tag: bad link URL in the post body.
  • Invalid URL protocol '...' for attribute 'href' in <a> tag: bad link URL in the post body.
Free Inbound Marketing Training Learn inbound marketing techniques that range from creating content, using  social promotion, converting and nurturing leads, and all the way to marketing  to your customers. Start the course