Title: Custom JavaScript is not allowed
Last modified: June 14, 2022

---

# Custom JavaScript is not allowed

 *  Resolved [amrendra23](https://wordpress.org/support/users/amrendra23/)
 * (@amrendra23)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/)
 * Hello
 * Recently, I created a web story. After getting it indexed, it’s now started to
   show Amp invalid in search console. The reason showing Amp Invalid is “Custom
   JavaScript is not allowed”
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-javascript-is-not-allowed-21%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 14 replies - 1 through 14 (of 14 total)

 *  [Luckyna San](https://wordpress.org/support/users/luckynasan/)
 * (@luckynasan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15736052)
 * [@amrendra23](https://wordpress.org/support/users/amrendra23/) Hi there! Thank
   you for reaching out with your topic.
 * This error can occur if you are using a plugin that adds custom JavaScript to
   pages, which is not allowed in Web Stories. Could you provide your [Site Health](https://i.imgur.com/Rtkmsba.png)
   information so that I can take a closer look at your plugin setup? You can share
   [privately](https://docs.google.com/forms/d/e/1FAIpQLSd-AeFLOIJd4NLYz7EDUa9vMfzZIoT5Bn1leV3dL2CM_B1C6Q/viewform)
   if you prefer.
 *  Thread Starter [amrendra23](https://wordpress.org/support/users/amrendra23/)
 * (@amrendra23)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15737211)
 * I have submitted my site health info on the link you provided me.
 *  Thread Starter [amrendra23](https://wordpress.org/support/users/amrendra23/)
 * (@amrendra23)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15738195)
 * [@luckynasan](https://wordpress.org/support/users/luckynasan/)
 * I have submitted my site health info on the link you provided me
 *  [Luckyna San](https://wordpress.org/support/users/luckynasan/)
 * (@luckynasan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15739897)
 * [@amrendra23](https://wordpress.org/support/users/amrendra23/) Thank you for 
   submitting your site health information. I can see you have Rank Math SEO active
   which we have seen conflicts with in the past. If possible, could try temporarily
   deactivating this first to check if it may be causing a conflict. After temporarily
   deactivating that plugin please check your story in an incognito window on [https://search.google.com/test/amp](https://search.google.com/test/amp).
 * If the AMP validation errors do not subside after disabling that plugin, please
   try to switch to a temporary theme like Twenty Twenty-Two and retest to rule 
   out any conflicts with your theme.
 *  Thread Starter [amrendra23](https://wordpress.org/support/users/amrendra23/)
 * (@amrendra23)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15740207)
 * Like you suggested, I did the procedures. But still getting the same error.
    -  This reply was modified 3 years, 12 months ago by [amrendra23](https://wordpress.org/support/users/amrendra23/).
 *  Thread Starter [amrendra23](https://wordpress.org/support/users/amrendra23/)
 * (@amrendra23)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15740447)
 * Rank Math SEO is the only seo plugin, I have installed. If it is get disabled
   then what SEO plugin should I go for
 *  [Luckyna San](https://wordpress.org/support/users/luckynasan/)
 * (@luckynasan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15740481)
 * [@amrendra23](https://wordpress.org/support/users/amrendra23/) To confirm, can
   you temporarily the plugin and let me know then I will retest it on the AMP test
   tool? It will take a brief moment.
 *  Thread Starter [amrendra23](https://wordpress.org/support/users/amrendra23/)
 * (@amrendra23)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15740497)
 * I have deactivated the plugin as well as change the theme. You can test now
 *  [Luckyna San](https://wordpress.org/support/users/luckynasan/)
 * (@luckynasan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15740630)
 * [@amrendra23](https://wordpress.org/support/users/amrendra23/) Thank you. You
   can return to your normal settings now. With all plugins disabled and using a
   default theme I am seeing several of the errors include that sitespeed-js script:`
   <script type="text/javascript" src="https://jobpreneur101.com/sitespeed-js/d41d8cd98f00b204e9800998ecf8427e.
   js"></script><script type="text/javascript">`
 * Do you know if you use any CDN service and if there is a site speed setting? 
   You may be experiencing an issue from the site/hosting level.
 * Could you contact your web developer or hosting provider to access the PHP error/
   WP DEBUG logs? Temporarily setting `define( ‘WP_DEBUG’, true );` and `define(‘
   WP_DEBUG_DISPLAY’, true );` in your `wp-config.php` file should show you an additional
   error message that can help you track down the issue.
 *  [Luckyna San](https://wordpress.org/support/users/luckynasan/)
 * (@luckynasan)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15765037)
 * [@amrendra23](https://wordpress.org/support/users/amrendra23/) We are going to
   mark your topic as resolved as we haven’t received a response. Please feel free
   to open a [new support topic](https://wordpress.org/support/plugin/web-stories/#new-post)
   if you continue to experience any issues. Thank you.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [3 years, 11 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15834814)
 * [@luckynasan](https://wordpress.org/support/users/luckynasan/) Please don’t ask
   people to raise new support topic for the same thing. This user made 3 duplicate
   topics which has been archived.
 * [@amrendra23](https://wordpress.org/support/users/amrendra23/) You can mark this
   topic Not Resolved (it’s your topic after all) and continue here.
 * I have archived your 3 new identical topics.
 *  Thread Starter [amrendra23](https://wordpress.org/support/users/amrendra23/)
 * (@amrendra23)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15834866)
 * [@luckynasan](https://wordpress.org/support/users/luckynasan/)
    The error “Custom
   JavaScript is not Allowed” is still popping on the screen after going with all
   the procedures you said, please help me out!
    -  This reply was modified 3 years, 11 months ago by [amrendra23](https://wordpress.org/support/users/amrendra23/).
 *  Plugin Author [Pascal Birchler](https://wordpress.org/support/users/swissspidy/)
 * (@swissspidy)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15835405)
 * From what I can see there is some JavaScript being added to your stories coming
   from SiteProtect DDoS protection.
 * I recommend reaching out to your hosting provider or website administrator to
   adjust configuration of SiteProtect so that it does not break stories like that.
 * It’s not an issue with the Web Stories plugin, so we can’t really help you with
   that.
 *  [Luckyna San](https://wordpress.org/support/users/luckynasan/)
 * (@luckynasan)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15885130)
 * [@amrendra23](https://wordpress.org/support/users/amrendra23/) Since we are unable
   to guide you on the SiteProtect configuration and have reached the limit of the
   support we can provide in this case, this topic will be closed as resolved. If
   you do run into other questions or encounter any new issues with the Web Stories
   plugin please do reach out again and we’ll try our best to help. Thank you.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Custom JavaScript is not allowed’ is closed to new replies.

 * ![](https://ps.w.org/web-stories/assets/icon.svg?rev=2386543)
 * [Web Stories](https://wordpress.org/plugins/web-stories/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/web-stories/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/web-stories/)
 * [Active Topics](https://wordpress.org/support/plugin/web-stories/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/web-stories/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/web-stories/reviews/)

## Tags

 * [amp error](https://wordpress.org/support/topic-tag/amp-error/)

 * 14 replies
 * 4 participants
 * Last reply from: [Luckyna San](https://wordpress.org/support/users/luckynasan/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/custom-javascript-is-not-allowed-21/#post-15885130)
 * Status: resolved