Troubleshoot issues with AMP
Last updated: October 13, 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.
Related content
-
Partition your HubSpot assets
Assets across HubSpot can be partitioned so that only the right teams and users can view and edit them. This...
Knowledge Base -
Add videos to your HubSpot content
With HubSpot video, you can upload videos to the files tool, then add them to pages, marketing emails, blog...
Knowledge Base -
Optimize your page and blog content for search engines
Following SEO best practices leads to more organic traffic to your website over time. Learn how to use your...
Knowledge Base