Skip to main content

Solved: “Error in required structured data element” (AMP issue)

Required structured data” message is one of the most common issues seen at Google Search Console. In this post, I will explain why this error comes up and how to fix it.

AMP (Accelerated Mobile Pages) is a project supported by Google to make web pages faster and more responsive across different devices and web browsers. A library is provided by AMP Project Team for web developers. Google provides tools such as Search and Analytics to build AMP-supported web pages.

In order to check if your website is AMP-ready, go to Google Search Console. If there are any issues in any of your web pages, an error message will be displayed in the Dashboard. Here is one of the most common error messages:

Error in required structured data element
AMP version has invalid structured data

An AMP issue in Google Search Console: "Error in required structured data element"
An AMP issue in Google Search Console: “Error in required structured data element”
Detailed error message
Detailed error message

Are you receiving “Custom JavaScript is not allowed” error message? Check this post out.

Solution to fix “Required structured data element” issue

Google wants to provide a better search experience by showing related pictures near search results. These related pictures (named “Featured Image” in WordPress) should be included in the posts by their authors. If your posts don’t have related pictures, you will probably see “Error in required structured data element” or “AMP version has invalid structured data” message in Google Search Console dashboard.

An example to structured
data in search results
An example to structured
data in search results

In order to solve this AMP issue, simply add featured images to your posts and start re-validation at Google Search Console. Depending on the page count in your website, it may take a few days or weeks to complete re-validation. You will receive an email once it is completed.

For more information about structured date, visit Google’s guideline. There is also a tool to check your site compatibility to Google’s structured data rules.

Solved: “Custom JavaScript is not allowed” (Google Search Console – AMP issue)

AMP (Accelerated Mobile Pages) is an initiative to make web pages faster and more compatible across different devices and browsers. It is lead by AMP Project. A library is provided for web developers. In this post, I will explain how to fix a popular AMP issue.

Google supports AMP Project and provides tools and guidance to integrate AMP web pages with Google tools such as Search and Analytics (Receiving an issue with cookies while using Google services? Check out this blog post).

You can check if your website is AMP-ready by using Google Search Console. If there are any issues in any of your web pages, an error message will be displayed in Search Console Dashboard. Here is one of the error messages displayed most:

Custom JavaScript is not allowed

<script>'undefined'=== typeof _trfq || (window._trfq = []);'undefined'=== typeof _trfd && (window._trfd=[]),_trfd.push({'tccl.baseHost':'secureserver.net'}),_trfd.push({'ap':'cpsh'},{'server':'xx'}) // Monitoring performance to make your website faster. If you want to opt-out, please contact web hosting support.</script><script src='https://img1.wsimg.com/tcc/tcc_l.combined.1.0.6.min.js'></script></html>

Search Console Custom JavaScript is not allowed AMP issue

Solution for “Custom JavaScript is not allowed” AMP issue

The root cause of this problem is that the feedback code implemented to your page by your hosting provider (It’s GoDaddy in my case).

As mentioned in the page code (If you want to opt-out, please contact web hosting support), GoDaddy recommends contacting Customer Support to fix this problem. However, you can make necessary configuration by yourself. You just need access to your website’s control panel on GoDaddy.

Follow the steps below to fix this issue for websites hosted by GoDaddy:

  1. Login to your control panel
  2. Click the details icon (three dots in a row “…”) on the top right side of the page
    GoDaddy control panel AMP issue
  3. Click “Help us”
  4. Click “Opt out”
    GoDaddy opt-out AMP issue

After opting out from the feedback system, click “Validate Fix” button in your Google Search Console. Then you should patiently wait. It may take a few days from Google to scan your pages and mark the issue as fixed.

You can always go back to the same page and opt in for feedback back.