Troubleshoot issues with AMP
Last updated: June 26, 2020
If Google Search Console reports issues with your AMP pages, the first thing to do is check the AMP validator. This 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.
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.
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.
- Images should be at least 1200 pixels wide for AMP: add an image to your post that
is at least 1200 pixels wide and select it as the featured image.
Blog
Thank you for your feedback, it means a lot to us.
This form is used for documentation feedback only. Learn how to get help with HubSpot.