On this page
What this issue is
Hidden spam links are outbound links added to your pages without your knowledge. They often sit in the footer because that part of the template loads on every page. The attacker hides them so you do not notice, but search engines still read them.
Common hiding tricks include display:none, visibility:hidden, font-size:0, text with the same colour as the background, or a box pushed far off screen with position:absolute; left:-9999px. The links usually point to pharmacy, casino, loan or adult sites.
The code can live in several places: the theme's footer.php or footer template, a widget, a database option, a plugin, a script injected from another domain, or a tag in Google Tag Manager.
Why it costs you leads or sales
Visitors rarely see the links, so the direct damage is quiet. The cost comes from what they signal and what usually comes with them.
- Search engines may treat your site as spammy or compromised, which can lower rankings for the pages that bring in leads.
- Your site passes trust to unrelated, often shady, sites.
- A hack that added links often added other things too: redirects, spam pages or a backdoor.
- If Google or a browser flags the site, visitors see warnings and leave.
- Page weight and load time can rise if the injected code loads extra scripts.
- Weak entry pointOutdated plugin or stolen password
- Code injectedLinks added to footer template or database
- Every page serves linksHidden with CSS
- Search trust dropsSpam signals, possible warnings
The break happens at the entry point; everything after it carries the hidden links.
How to check if your site has it
View the page source
Open your homepage, right-click and choose View page source (or press Ctrl+U). Search for
display:none,left:-9999,font-size:0andvisibility:hiddennear the bottom of the file.List all outbound links
Search the source for
<a href="httpand scan for domains you do not recognise, especially pharmacy, casino or loan sites.Check as a search engine would
Some injections only show to crawlers. Use the URL Inspection tool in Google Search Console, then View crawled page, and read the HTML for unknown links.
Search Google for spam terms
Search
site:yourdomain.com viagra,site:yourdomain.com casinoand similar. Results mean spam is indexed.Check Search Console
Open Security & Manual Actions and look for any security issue reports.
Disable JavaScript and compare
Compare the page with and without scripts. Links that appear only with scripts point to an injected script or tag.
How to fix it
Take a full backup first so you can investigate later. Then remove the links and the way they got in. The location depends on your platform.
Check the theme footer
Go to Appearance > Theme File Editor (or use SFTP) and open
footer.php. Look for unfamiliar links or long encoded strings such asbase64_decodeoreval.Check widgets and options
Review Appearance > Widgets and footer settings in your theme. Search the database (wp_options, wp_posts) for the spam domain with phpMyAdmin.
Reinstall core, themes and plugins
Reinstall WordPress core from Dashboard > Updates, and replace themes and plugins with fresh copies from trusted sources. Delete unused or nulled plugins.
Scan and check users
Run a malware scanner plugin, and check Users for admin accounts you do not recognise.
Edit the theme code
Go to Online Store > Themes > Edit code. Open
footer.liquidand thetheme.liquidlayout, and look for links or scripts you did not add.Review apps
Remove apps you do not use and check Settings > Apps for unknown ones. Some apps inject code into the theme.
Secure staff accounts
Under Settings > Users and permissions, remove unknown staff and reset passwords.
Audit tags
Open your container and review Custom HTML tags. Injected links are often added with a script that writes to the footer.
Check users and versions
In Admin > User management, remove unknown users. In Versions, see who published recent changes.
Remove and publish
Delete the rogue tag and publish a new version.
Check custom code
Open Project settings > Custom code and review the footer code area. Also check page-level custom code and Embed elements in the footer.
Check team access
Review workspace members and remove unknown ones, then republish.
Check custom code
Go to Settings > Custom code and remove unknown snippets. Review embedded HTML elements in the footer.
Review contributors
Remove unknown site collaborators and change your password.
Check code injection
Go to Website > Pages > Website Tools > Code Injection (menu names can vary by version). Look at the Footer field for unknown code.
Review contributors
Remove unknown contributors and reset your password.
Check funnel and site code
In each funnel or website, open Settings and check the Footer tracking code and custom code elements for unknown links or scripts.
Review team members
Remove unknown users and reset passwords.
Search the codebase
Search files for the spam domain and for
eval(,base64_decode(anddocument.write(. Compare with a clean copy from version control.Restore clean files
Redeploy from a known-good commit instead of patching by hand, and check for unknown files, especially recently modified ones.
Rotate credentials
Change hosting, SFTP, SSH and database passwords and keys.
grep -rIl "spam-domain.example" /path/to/site
grep -rIn "base64_decode\|eval(" /path/to/site --include=*.php
find /path/to/site -type f -mtime -7Change every password
Reset admin, hosting, database, FTP and email passwords, and turn on two-factor authentication where offered.
Update everything
Update the CMS, themes, plugins and apps. Remove anything abandoned.
Remove unknown users and files
Delete rogue admins and unfamiliar files. If you find a backdoor, treat it as a bigger compromise and consider restoring a clean backup or asking your host for help.
Request a review if flagged
If Search Console reported a security issue, fix it first, then request a review there.
Compromised
- Unknown links to pharmacy or casino sites
- Hidden with display:none or off-screen CSS
- Injected code in the theme, database or tag manager
- Entry point still open
Cleaned
- Only links you added
- Clean files restored from a trusted source
- Passwords changed, software updated
- Unknown users removed
How to confirm it's fixed
- View page source on several pages and find no unknown outbound links.
- Use Search Console URL Inspection and check the crawled HTML is clean.
- Clear all caches: plugin, server and CDN.
- Search
site:yourdomain.complus spam words and see whether results disappear over time. - Re-scan files and check no unknown users or recently modified files remain.
- Check again after a day and a week in case a hidden backdoor reinjects the code.
How to prevent it happening again
- Turn on automatic updates for security releases of your CMS and plugins.
- Use strong unique passwords and two-factor authentication for every admin account.
- Give users the lowest role they need.
- Remove unused plugins, themes and apps, and never use nulled (pirated) ones.
- Keep offsite backups so you can restore a clean version.
- Lock down tag manager publishing rights.
- Add Search Console and set up email notifications for security issues.
- Check the footer source monthly.
How FunnelGuard handles this
FunnelGuard does not check for hidden spam links in your footer today. It is a possible future check. FunnelGuard is a synthetic monitoring service: a robot visitor runs your real journeys such as lead forms, checkouts and booking buttons on a schedule, checks each step and the tracking hits, and confirms test leads arrive.
Nearby, that can help you notice the effects of a compromise that breaks a journey, for example a form that stops working, a step that fails or tracking that stops sending. It will not tell you a hidden link exists.
To watch for hidden links, use Google Search Console security reports and email notifications, run a regular malware scanner for your platform, and view the page source of key pages monthly. You can also run a free FunnelGuard read-only website audit, but it does not replace a malware scan.
Questions people ask
Why are there links in my website footer that I did not add?
Most likely your site was hacked. Attackers inject links into the footer to sell advertising or boost other sites, often through an outdated plugin, a weak password or a rogue tag. Treat it as a security incident and look for the entry point, not just the links.
How do I find hidden links on my website?
View the page source and search for display:none, left:-9999, font-size:0 and unfamiliar <a href domains. Then check the crawled HTML in Google Search Console URL Inspection, since some injections only show to crawlers.
Where do hidden spam links in the footer come from?
They usually come from a hacked theme file such as footer.php, a modified database entry or widget, a compromised plugin, or a malicious tag or script. The attacker gained access through a vulnerability or stolen login.
Will hidden footer links hurt my SEO?
They can. Search engines may see your site as spammy or compromised, and spam pages or security flags that often come with the hack can reduce visibility. Removing them and fixing the entry point is the best response.
Is it enough to delete the spam links?
No. If you leave the entry point open, the links usually come back. Change all passwords, update software, remove unknown users and files, and check again after a few days.
Does FunnelGuard detect hidden spam links in the footer?
No. FunnelGuard does not check for this yet. It monitors your funnel journeys, tracking hits and lead delivery, so use Search Console, a malware scanner and manual source checks for hidden links.
How often should I check my footer for hidden links?
Check key pages monthly by viewing the source, and after any plugin or theme change. Also keep Search Console security notifications on so Google can email you if it finds an issue.
Related issues
- OPS-142Japanese keyword / pharma / casino spam pages injectedFix guide
- OPS-148Rogue admin user createdFix guide
- OPS-149Backdoor files (web shells) on serverFix guide
- OPS-150Search Console security issues / manual actionsFix guide
- OPS-154SEO spam in title/meta for Google only (cloaking)Fix guide
- OPS-138Google Safe Browsing 'Deceptive site' warningFix guide