• Resolved thiagobbbottaro

    (@thiagobbbottaro)


    Hi,

    I’m trying to indexate my websiteon Google via it’s Search Console, but i keep receiving the “Custom Javascript not allowed on Amp pages” error.

    I’ve already tried to deactivate every other plugin, but this error keeps on.

    This code is highlighted

    <script async type=”text/javascript” src=”/_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3&ns=3&cb=1844901555″></script>

    I’m not a developer, i was able to overcome every other problem on the website construction, but this one i just couldn’t find the proper solution.

    If you guys could help, i would be really glad.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Renee Johnson

    (@reneesoffice)

    @thiagobbbottaro thanks for reaching out!

    Are you using a proxy service (CDN, Firewall, etc.) on the site? The script provided and the headers on the site look to point to the Incapsula service.

    Thread Starter thiagobbbottaro

    (@thiagobbbottaro)

    @reneesoffice

    I use W3 Total Cache. I think it has CDN operations in it

    I even tried to apply these tutorial steps, but it didn’t resolve my problem.

    One more thing. I also tried uninstall W3 Total Cache and run a live test of my website on Google Search Console but nothing happened again

    Renee Johnson

    (@reneesoffice)

    @thiagobbbottaro thanks for your reply!

    From what I understand, Incapsula sounds like a separate service/platform from W3TC. I’m not sure what feature of theirs is adding this script and how, since I don’t see it directly in the source code of the page (it could either be added dynamically or directly on the website through the template files).

    Checking with someone who may have assisted with setting up the site or perhaps even your host might be good resources to confirm if this is configured for the site.

    Thread Starter thiagobbbottaro

    (@thiagobbbottaro)

    @reneesoffice

    I was just about to update this post.

    Another person had the same issue and he resolved it by going on “minify” tab of W3 Total Cache and disabled the JS option.

    I did the same and ran a live test on search console. Apparently it worked (took about 2 minutes to change the status). The problem is that i exceeded the number of attempts of the dayon search console, so i will only be sure of the succes tomorrow when i will be able to test again.

    Maybe that’s why you didn’t found the source code of the page.

    And i was on a private browsing, so i lost the referencial link to the solution i wasn’t able to find it again (i thought the forum’s search tool would be better)

    Tomorrow i will run another test and try to find the post so others can use it if necessary

    Thanks a lot! It really helped finding the most likely source of the problem

    Renee Johnson

    (@reneesoffice)

    @thiagobbbottaro thanks for the update! Yes feel free to follow up on what you find. I’m currently still seeing the error in the AMP Test tool at the moment.

    Thread Starter thiagobbbottaro

    (@thiagobbbottaro)

    @reneesoffice

    Yes, it came back

    I don’t really know why this is happening.

    Now i’m trying to delete W3 Total Cache and use another cache plugin (WP Super Cache)

    This problem is really anoying. i’ll keep trying to solve it

    Thread Starter thiagobbbottaro

    (@thiagobbbottaro)

    @reneesoffice

    I don’t have acces to the wp-content file due to the fact that my host’s plan does not include acess to cPanel hence i don’t have acess to fillezila.

    Altough if i ask, they acess it for me.

    Do you think it’s a good idea to ask them to remove this JS code?

    Renee Johnson

    (@reneesoffice)

    @thiagobbbottaro thanks for your reply!

    May I ask who is your host? Also, feel free to provide your Site Health Information through this form in case we can spot anything.

    I cannot be totally certain where this JS code is coming from or the outcome of removing it, but at least you can confirm with them if they see it in the template files. In general, you should make backups of your site or ask them if they have the capability to restore your site if needed.

    I also recommend asking them if you have a CDN service enabled for the site. You can show them this image of the response headers that shows Incapsula referenced as the CDN on all assets coming from the site and ask them if it is related to their services.

    Thread Starter thiagobbbottaro

    (@thiagobbbottaro)

    @reneesoffice

    Yes, it’s Hostgator on WordPress hosting.

    I filled the form, thanks.

    As the support team told me, the JS code appears on the template files, but does not show what’s causing it

    They said i have a CDN service enabled, wich is SiteLock (that provides the SSL). Although they said that apparently the ssl does not have relations with the JS code.

    By the link above it seems that Sitelock does have some work with Incapsula

    https://www.hostgator.com/help/article/configuring-an-ssl-in-sitelock-with-an-existing-firewall

    Maybe sendind an e-mail directly to Sitelock?

    Thanks for the help again

    Renee Johnson

    (@reneesoffice)

    @thiagobbbottaro thanks for the update!

    That does make sense to contact SiteLock about their services and that script.

    Thread Starter thiagobbbottaro

    (@thiagobbbottaro)

    @reneesoffice

    Renee, i think now it worked. On Google Search Console and on AMP Test tool it’s all ok.

    I contacted the support of Site Lock and here’s their answer:

    Thank you for contacting SiteLock technical support.

    Accord to our engineers, those Incapsula files are not really files and they cannot be removed. They are there to act as cookies that track requests between the client, the firewall proxy, and the origin site to make certain that all traffic goes to and from the site correctly.

    There are two Google Search items (one crawler and one app) and we have whitelisted on the firewall for the site. That should correct their problem. Since Google is rarely blocked on a site because of the firewall, we would need specific evidence from the customer as to why they believe the Google requests are being blocked.

    Also, we browsed the site and monitored the network requests to the site, and we see no evidence that anything is being blocked.


    It took a few days between their answer and the good news from Search Console and AMP Tool, that’s why i’m only replying today.

    I don’t think this problem will affect other people cause they added the code on Google’s whitelist, but if it happens, let’s hope they find this thread.

    Thanks a lot for the help and the patience. I wish i could return the help. If you think in something, let me know.

    Best Regards

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problem with Custom Javascript not allowed on Amp pages’ is closed to new replies.