AdSterra.Com Scripts Removed By Server On Website [SOLVED: Scripts removed from HTML source code]

AdSterra.Com Scripts Removed By Server On Website [SOLVED: Scripts removed from HTML source code]


Trying to monetize a website with the AdSterra network, but after successfully having added a site and an advertisement code in the system, and added the corresponding code on my website, the ads were displayed fine locally, but wouldn't display once uploaded on the server, despite being the exact same source code.

Here's the reason why - it might help you monetizing your website with their ads network.

What is AdSterra?

AdSterra

AdSterra is a network of display ads non only for websites, but for any digital communication product.

Although being more developed for HTML content like websites and newsletters, with the inclusion of various specific ad formats (Popunder, Native banner, banners, vast and social bar), it can also monetize any other communication system in which it is possible to click on links, such as social networks like Facebook business pages or discussion groups, Whatsapp groups, Telegram groups, Instagram stories, and more.

Scripts removed by web server: track issue in Imunify360 on CPanel

However, when adding their execution code, which consists always of a Javascript and sometimes a specific HTML element, it might happen that the final code is not being sent out by the server, does not happen on the webpage source code in Internet browser, and therefore the ads are not displayed and are not being monetized.

This is most likely due to a webserver configuration, that can be changed by accessing your CPanel account.

CPanel administration guides

Once on the CPanel administration panel, find the security section where the Imunify360 icon should be available, and click on it to open the related security options.

Server script code missing from delivered web page: check Imunify360 malware detection on CPanel

There, you will most likely see a list of malicious files that have been blocked or modified by the Imunify360 system, with either on of these statuses:

  • Infected status means that a malware has been identified, but still delivered to client,
  • Cleaned status means that the corresponding file has been treated after having removed identified malware.

In our case, the source scripts in which AdSterra code has been added were cleaned automatically by Imunify360, that removed the advertisement code from the source script before even treating it in the PHP program, and for sure not delivering any file to website visitor that would let him know about this script.

Solve the scripts removed by web server on Imunify360

The solution here can be simple, provided that the exact script on which AdSterra code is present has been identified by the Imunify360 malware scanner, the reason code and the status.

File has been identified as infected

You can either select the checkbox in front of the identified script line, and select the add to ignore list option behind the gearbox icon. This will therefore prevent Imunify360 from ever removing again an identified script from the file, and only for this file.

Master Website Creation: Enroll Now!

Transform your digital presence with our comprehensive Website Creation course – start your journey to becoming a web expert today!

Enroll Here

Transform your digital presence with our comprehensive Website Creation course – start your journey to becoming a web expert today!

However, this option is only available for files that have been detected as infected, but have not been cleaned yet.

Restore a single file and add to ignore list

If you only have a few files for which the malware scanner shouldn't be executed, you can simply select them one after the other, click on the clock icon, the last on the right side of the line corresponding to identified file, and validate the restore option in the popup that appears.

Once this has been done, the original file include source code and scripts in dispute will have been restored on the server, allowing you to add the file to the ignore list, thus allowing your website to deliver webpages containing the AdSterra Javascript code.

Use the settings the bypass malware scanner for all files

If your files have already been cleaned up, it means they have been executed by PHP scripts and delivered after identified content has been removed, and putting the file in ignore list will not solve the problem, as the files on server have already be cleaned.

In that case, another solution, if you are sure that no malware exist on your server, is to go on the advanced Imunify360 settings by clicking on the gearbox icon on the application top right corner, right next to the language icon.

This will open the advanced settings menu, in which you can select one of two options for the default action on malware detection in your websites files:

  1. Just display in dashboard - identified malwares will be marked as infected but won't be modified,
  2. Cleanup - identifed malwares will be directly removed from source files on servers, and won't even be processed by PHP.

Checking the AdSterra displayed ads

Once solved, you might have to reupload your files to the server, and aditionally clean your website and CDN cache if relevant.

After these actions have been performed, simply reload the page and observe the magic happening, the chosen AdSterra display ads being displayed on your webpage as they should, and as it probably happened locally during development.

AdSterra ads displayed on What Can I Wear fashion tips website

To go further and add an extra layer of security, make sure to get your website pages to go through a CDN between your visitors and your server, that will be able to stop any non-welcomed request to your web server and save your resources, while delivering content faster.


Yoann Bierling
About the author - Yoann Bierling
Yoann Bierling is a Web Publishing & Digital Consulting professional, making a global impact through expertise and innovation in technologies. Passionate about empowering individuals and organizations to thrive in the digital age, he is driven to deliver exceptional results and drive growth through educational content creation.

Master Website Creation: Enroll Now!

Transform your digital presence with our comprehensive Website Creation course – start your journey to becoming a web expert today!

Enroll Here

Transform your digital presence with our comprehensive Website Creation course – start your journey to becoming a web expert today!



Comments (0)

Leave a comment