Custom JavaScript is not allowed in AMP - 100% Fixed.

preview_player
Показать описание
Are you getting Custom JavaScript is not allowed error for your AMP pages? Watch this video to fix it. Google Search console was throwing an error for a few of my Blog pages. And I fixed it using the steps that I show in the video.

Google was not able to index my AMP pages for my Blog. The error was that some custom JavaScript and CSS were injected into the AMP pages. Upon investigation, I found out that W3 Total cache was injecting minified JS (JavaScript) and CSS (Cascading Style Sheets) links into the pages.

Errors showing up in search console:
1. Custom JavaScript is not allowed
2. External stylesheets not supported, except for whitelisted font providers.

How to fix it?
For W3 Total Cache you need to activate the AMP extension. This will remove all the custom JS and CSS from the AMP pages. Go to your site Admin Dashboard - Performance - Extensions and activate AMP. W3 Total Cache comes built-in with the extension. You just need to activate it.

What is AMP?
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

Google supports AMP Project and provides tools and guidance to integrate AMP web pages with Google tools such as Search and Analytics.

*********************************

*************************************************************************************************
If you have any questions regarding this video you can connect with me,

Twitter handle: @joseph_rialab

Рекомендации по теме
Комментарии
Автор

thank you so much. It was very useful content.

mnnwise
Автор

is there any way to remove custom js error without removing custom js in amp plugin

himanshubhatt
Автор

Hi...I really didn't understand what are you doing... please help me ..my problem is linked amp version is invalid. Please man...🙏 Help me

donr
Автор

There is custom javascript in my html page, And this script is important, Now I want to do AMP page. can you help me Please?

mayurvandkar
Автор

Disallowed attribute or attribute value present in HTML tag.


Ye error aa rha hai sirr
Kiase theeek kruu ese

KHTAMSING
Автор

Cannot continue validation process
Affected pages were found. Fix the issue and run validation again

please help

Manipulationclan
Автор

Am having issues with my AMP site, is showing me: An AMP component 'script' tag is present, but unused

emmanuelgodwin