Hidden links to spam sites

How the scan finds hidden links to pharmacy, gambling, loan or replica sites in your page source, when it warns or fails, and how to clean a site.

What AuditX checks

The scan reads the HTML of the pages it crawled. It uses pages that answered with a status from 200 to 399 and that are not redirects, so a page is counted once. It looks at every link with an address on another site. A link to the same host, or to a subdomain or parent of it, is skipped. A link counts as hidden when the link, or any element around it up to the body, is hidden by markup written in the page itself: the hidden attribute, or an inline style with display none, visibility hidden, font size 0, opacity 0, a left, top or text indent of minus 100 or further, or a box with overflow hidden and a width or height of 0. Hiding done in a CSS file or a class name is not read, and neither are links added by JavaScript. A hidden link counts as spam when its text (the first 80 characters) or its address contains one of a short list of whole words and phrases about pharmacy (viagra, cialis, levitra, kamagra, tramadol, xanax, online pharmacy, cheap pills), gambling (casino, slot gacor, slot online, situs slot, gacor, maxwin, togel, judi online, judi slot, sbobet), payday loans or replica watches, or when the host name contains viagra, kamagra, casino, gacor, togel or sbobet. The scan keeps at most 10 such links per page. The check passes when none are found. It warns when links are found but the title of at least one crawled page contains a word from the same topic, because a real online pharmacy or casino site may link on purpose. Otherwise it fails. The message names up to 3 hosts and up to 3 ways of hiding. The scan reads what a normal browser receives, so spam that is shown only to search engines is not seen here. It does not judge links that are visible, words outside the list, or links hidden in other ways. A fail lowers the security score, and a warn lowers it by less. This check never caps the overall score.

Why it matters

Google Search Central spam policies name hidden text and link abuse as a violation, and list text positioned off screen and a font size or opacity of 0 as examples. Google says sites that violate its policies may rank lower in results or not appear at all.

Google Search Central describes hacked content as content placed on a site without permission because of security weaknesses, and says hackers add hidden links or hidden text so search engines see it while the owner does not. Its Security issues report in Search Console shows what Google found.

How to fix it

  1. Open the page source of the page named in the report and search for the host name or the word the report shows. Note which file or template the link sits in.
  2. Remove the link and whatever put it there. Common places are a plugin, a theme, a template file, a widget or a database field. Ask your web developer or host if you cannot find it.
  3. Update the CMS, plugins and theme, delete any you no longer use, and change all admin, hosting, FTP and database passwords, because the same weakness may let the links come back.
  4. Check the Security issues report in Google Search Console. If it lists a problem, ask for a review once the site is clean, then scan again. If a hidden link is meant to be there, show it to visitors or remove it.
<!-- Look for blocks like this and find out who added them -->
<div style="display:none"><a href="https://pharmacy.example/">cheap pills</a></div>

Does your site pass this check? A free scan runs it with every other check and shows the result in about a minute.

Scan my site

Sources

Related checks

Last reviewed 2026-11-13.