Title: AMP Custom JavaScript is not allowed
Last modified: April 4, 2020

---

# AMP Custom JavaScript is not allowed

 *  Resolved [gbengard](https://wordpress.org/support/users/gbengard/)
 * (@gbengard)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/)
 * I received an error message from Google today.
 * “Search Console has identified that your site is affected by 1 AMP issues:
    Top
   Errors
 * Errors can prevent your page or feature from appearing in Search results. The
   following errors were found on your site:
 * Custom JavaScript is not allowed.
 * We recommend that you fix these issues when possible to enable the best experience
   and coverage in Google Search.”
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Famp-custom-javascript-is-not-allowed-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/#post-12628007)
 * There is some code being injected into your site:
 *     ```
       <div style='display:none' id='sbbhscc'></div>
                 <script type="text/javascript">
                   var sbbvscc='';
                   var sbbgscc='';
                   function genPid() {return String.fromCharCode(118)+String.fromCharCode(66) ; };
                 </script>
               <div id='sbbfrcc' style='position: absolute; top: -10px; left: 30px; font-size:1px'></div>
         <script type="text/javascript">...
       ```
   
 * This looks suspicious, perhaps malicious. You may need to investigate for a possible
   site hack. Contacting your host may be the best resolution to fix this.
 *  Thread Starter [gbengard](https://wordpress.org/support/users/gbengard/)
 * (@gbengard)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/#post-12628539)
 * Thank you for your response [@westonruter](https://wordpress.org/support/users/westonruter/).
 * I have contact namecheap but they couldn’t offer any help.
 * Please what can I do as the error affects 44 pages on my website.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/#post-12628642)
 * That same code is also being injected in the non-AMP version of your site: [https://www.techidence.com/lenovo-yoga-s740-arrives-with-4k-screen-and-alexa/](https://www.techidence.com/lenovo-yoga-s740-arrives-with-4k-screen-and-alexa/)
 * It will certainly also be there if you turn off the AMP plugin. But you can try
   to deactivate other plugins to see if it goes away. The code _looks_ malicious
   because it seems to be doing some complicated obfuscation to hide its true purpose.
 * To identify where the bad code is coming from, you should do a search across 
   all files for some unchanging part of the code, like perhaps “sbbhscc”. If it
   is in a plugin, then deactivate the plugin. If it is in WordPress core file, 
   you’ll need to re-install WordPress.
 * Ultimately, it’s not something the AMP plugin can help with. However, here are
   some next steps to take: [https://wordpress.org/support/article/faq-my-site-was-hacked/](https://wordpress.org/support/article/faq-my-site-was-hacked/)
 *  [goutham93](https://wordpress.org/support/users/goutham93/)
 * (@goutham93)
 * [6 years ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/#post-12887624)
 * Hi [@gbengard](https://wordpress.org/support/users/gbengard/) and [@westonruter](https://wordpress.org/support/users/westonruter/)
 * I’m facing exactly the same issue that you faced. I also see these kind of strange(
   id=’sbbhscc’) stuff having injected into my code.
 * How did you fix it? Can you help me?
 * Regards,
    Goutham
    -  This reply was modified 6 years ago by [goutham93](https://wordpress.org/support/users/goutham93/).
    -  This reply was modified 6 years ago by [goutham93](https://wordpress.org/support/users/goutham93/).
    -  This reply was modified 6 years ago by [goutham93](https://wordpress.org/support/users/goutham93/).
 *  Thread Starter [gbengard](https://wordpress.org/support/users/gbengard/)
 * (@gbengard)
 * [6 years ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/#post-12890332)
 * Hi [@goutham93](https://wordpress.org/support/users/goutham93/)
 * In my own case, it was as a result of free CDN I used, after deactivating it 
   everything works fine.
 * Regards,
    Gbengard
 *  [goutham93](https://wordpress.org/support/users/goutham93/)
 * (@goutham93)
 * [6 years ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/#post-12895009)
 * [@gbengard](https://wordpress.org/support/users/gbengard/) Thanks for your response.
   I’m assuming you use “Namecheap” server too!
    Have you deactivated free CDN permanently?
   And how long did it take to fix itself after you deactivated your CDN?
 *  [goutham93](https://wordpress.org/support/users/goutham93/)
 * (@goutham93)
 * [6 years ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/#post-12899028)
 * [@gbengard](https://wordpress.org/support/users/gbengard/) Thanks for your response.
   I’m assuming you use “Namecheap” server too!
    Have you deactivated free CDN permanently?
   And how long did it take to fix itself after you deactivated your CDN?
 *  Thread Starter [gbengard](https://wordpress.org/support/users/gbengard/)
 * (@gbengard)
 * [6 years ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/#post-12901142)
 * I’m so sorry for late response [@goutham93](https://wordpress.org/support/users/goutham93/)
 * Yes, I’m using Namecheap server and I have deactivated the CDN permanently.
 * It depends on the number of pages currently affected. You don’t have to worry
   about it, just deactivate and monitor through Google Search Console.
 * Thank you
 *  [goutham93](https://wordpress.org/support/users/goutham93/)
 * (@goutham93)
 * [6 years ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/#post-12901322)
 * Ok [@gbengard](https://wordpress.org/support/users/gbengard/). I understand. 
   Let me monitor it! I really appreciate your time. Thanks a lot for your response
   again.

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

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

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

## Tags

 * [custom javascript](https://wordpress.org/support/topic-tag/custom-javascript/)

 * 9 replies
 * 3 participants
 * Last reply from: [goutham93](https://wordpress.org/support/users/goutham93/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/amp-custom-javascript-is-not-allowed-2/#post-12901322)
 * Status: resolved