Learn · Technical SEO · Beginner

How to check your site for hidden or injected links

Learn what Google counts as hidden links and cloaking, and how to use your browser and Search Console to look for links on your pages that you never added.

By Dean Cruddace · 45 minutes to do · Updated · Last reviewed

What hidden and injected links are

A hidden link is a link visitors cannot easily see, such as one in white text on a white background. An injected link is one someone else put on your site without permission. Cloaking means showing search engines different content from what people see.

Google says hidden text or links are a problem when placed solely to manipulate search engines and not to be easily viewable by people. Tabs, accordions, sliders, tooltips and screen-reader text do not break the policy.

Why hidden links matter to search

Google says hackers can add hidden links or text to your pages, or use cloaking to make a hack harder for you to spot, so a page that looks clean in your browser is not proof it is clean. Pages that break its spam policies may rank lower or not appear at all. See Google's spam policies and the Manual actions report help.

What you need to check your site for hidden or injected links

  • Access to Google Search Console with your site added as a property
  • A web browser, to view page source
  • A short list of pages to check, starting with your home page and your most important pages

Check your site for hidden or injected links, step by step

  1. 1

    Learn what you are looking for

    Read the hidden text, cloaking and hacked content sections of Google's spam policies. Hidden text or link examples include white text on a white background, text positioned off-screen with CSS, a font size or opacity of 0, and a link on a single small character such as a hyphen.

    You will know it worked when You can name three ways a link might be hidden and three design features Google says are acceptable.

  2. 2

    Look at the page as a person

    Open a page you want to check. Select all the text with Ctrl+A (Command+A on a Mac). Google's manual action help suggests this as a way to reveal text that is the same colour as the background. Look for blocks of text or links you do not recognise.

    You will know it worked when You have either spotted text you did not expect or confirmed that nothing unfamiliar is revealed.

  3. 3

    Search the page source for links you did not add

    Right-click the page, choose View page source, and press Ctrl+F. Search for href= and step through the results looking for addresses you do not recognise. Google advises searching your pages and source files for links you did not add. If you suspect a hack, use the next step instead of opening pages directly, as Google warns that can be risky.

    You will know it worked when You have a list of every outbound address on the page and you recognise each one, or you have marked the ones you do not.

  4. 4

    See what Google fetched

    Paste the page address into the inspection bar at the top of Search Console and open View crawled page to see the raw HTML Google received. Compare it with step 3. Google says hackers often make changes visible only to Google, such as links shown only when the visitor arrives from Google. See URL Inspection help and the Security issues report help.

    You will know it worked when You have compared the two versions and noted any link that is in Google's copy but not in the one you viewed.

  5. 5

    Search for pages you did not create

    In Google, search site: followed by your site's root address, with no space (for example site:example.com). Google's web.dev guidance recommends this to show pages on your site, including any a hacker might have added.

    You will know it worked when You have scrolled the results and recognise every page, or you have noted the ones you do not.

  6. 6

    Check the two Search Console reports

    Open Security issues and Manual actions in Search Console. Google calls the Security issues report the source of truth. Its example URLs are only a sample, and an issue with no examples does not mean no pages are affected.

    You will know it worked when Both reports are open and you have read what they say, including a message that no issues are detected.

  7. 7

    If you find something, act on Google's guidance

    For injected content, Google says to restore affected files from your last good backup or remove the spammy links from each page, then request a review in the relevant report. For hidden text on your own pages, remove or restyle it so it is equally visible to crawlers and people. For a confirmed hack, Google suggests building a support team, so consider a security professional.

    You will know it worked when The links are gone from the page source, and the report you used shows the review as requested or resolved.

Common mistakes when you check your site for hidden or injected links

  • Assuming a page is clean because it looks fine in your browser. Google says hackers use cloaking to hide changes from owners.
  • Treating a clean URL Inspection live test as a security check. Google says the live test does not check quality, security guidelines or manual actions.
  • Treating the Security issues sample URLs as the full list of affected pages.
  • Removing legitimate tabs, accordions or screen-reader text. Google lists these as acceptable.

Terms used when you check your site for hidden or injected links

Hidden link
A link placed on a page so that visitors cannot easily see it, for example in text the same colour as the background.
Cloaking
Showing search engines different content from what people see, with the aim of manipulating rankings or misleading users.
Content injection
A hacker adding content, such as spammy links, to your existing pages without permission.
Manual action
A penalty applied by a human reviewer at Google, shown in the Manual actions report.
Page source
The raw HTML code of a page, which you can view in your browser.
Links on your pages that you never added?

Send Dean a page address and what View page source shows. Rendering and crawling checks are part of technical SEO.

Talk to an SEO specialistTechnical SEO: rendering →