Skip to main content

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':''}),_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=''></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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *