On this page
What this issue is
A robots meta tag is a line in the page head that tells search engines whether to index the page, for example <meta name="robots" content="noindex">. Normally it is written into the HTML by your server or CMS.
With this issue, the HTML your server sends says nothing, or says index. Then JavaScript runs in the browser and adds or edits the tag so it says noindex. The rendered DOM (the page after scripts have run) differs from the raw HTML (what View Source shows). Google processes both, and a noindex found after rendering can still remove the page.
Why it costs you leads or sales
A noindexed landing page cannot appear in Google results, so organic visitors who would have filled in the form or bought never arrive. It is easy to miss because the page works for every visitor and looks fine in View Source. You often notice only when traffic to the page slowly falls or the page shows as Excluded in Search Console.
- Raw HTMLRobots tag says index or is missing
- Script runsJavaScript adds noindex to the head
- Google rendersSees noindex in the rendered DOM
- Search resultsPage dropped from the index
- Organic leadsNo visitors from search
The raw HTML looks fine, so the problem hides until Google renders the page.
Example: illustrative numbers showing traffic fading after Google re-renders the page and honours the noindex.
How to check if your site has it
Read the raw HTML
Open the page, press Ctrl+U (Cmd+Option+U on Mac) and search for
robots. Note what the tag says, or that it is missing.Read the rendered DOM
Right-click the page, choose Inspect, then in the Elements panel search (Ctrl+F) for
name="robots". If it says noindex here but not in View Source, a script wrote it.Run the console check
In the DevTools Console, run the snippet below. It prints the live robots value.
Ask Google what it sees
In Search Console, paste the URL into URL Inspection and choose View crawled page or Test live URL, then check the HTML tab and the Indexing section for 'Excluded by noindex tag'.
Find the culprit
In DevTools open the Sources tab and search all files (Ctrl+Shift+F) for
noindex. Also check your tag manager's Preview mode for tags that fire on the page.
document.querySelectorAll('meta[name="robots"], meta[name="googlebot"]').forEach(function (m) {
console.log(m.name + ': ' + m.content);
});How to fix it
Find the tag
In Preview mode load the page and look for Custom HTML tags that contain
noindexorrobots.Fix the trigger or remove it
Delete the tag, or narrow its trigger so it never fires on live, indexable pages (for example staging hostnames only). Then Submit and publish the container.
Check SEO plugin settings
In Yoast, Rank Math or similar, open the page's advanced or robots settings and make sure noindex is off. Also review the plugin's global rules for the post type.
Look for other scripts
Deactivate optimisation, A/B testing or custom code plugins one at a time and re-run the console check to find which one writes the tag. Also search the theme's header and Settings > Reading for the search engine visibility box.
Check theme code
In Online Store > Themes > Edit code, search theme.liquid and other files for
noindex. Remove any script that sets it on pages that should rank.Check apps
Disable SEO, popup or testing apps one at a time and re-check the rendered DOM to find the one that adds the tag.
Check custom code
Open Project settings > Custom code, and the page's own settings > Custom code, and remove any script touching the robots meta tag.
Check page SEO settings
In the page settings, make sure 'Exclude this page from search results' is off, then publish.
Search your source
Search the codebase for
noindex,robotsandsetAttribute('content'. In single-page apps check head managers such as react-helmet or vue-meta and any per-route meta logic.Set the tag on the server
Render the correct robots tag in the server HTML (server-side rendering or a template) and remove client-side code that changes it for indexable routes.
<meta name="robots" content="index, follow">How to confirm it's fixed
- View Source shows no noindex in any robots or googlebot meta tag
- The console snippet prints index, follow or nothing
- Search Console URL Inspection > Test live URL shows the page is indexable
- Request indexing for the URL in URL Inspection
- The page returns to the Indexed state in Search Console over the following days
How to prevent it happening again
- Keep robots rules in one place, ideally server-rendered, and avoid scripts that edit them
- Scope staging-only tags to staging hostnames in your tag manager
- Review tag manager and plugin changes in Preview mode before publishing
- Re-check the rendered DOM of key landing pages after every theme, plugin or tag change
- Watch the Pages report in Search Console for new 'Excluded by noindex tag' URLs
Broken
- View Source shows index or no robots tag
- Rendered DOM contains noindex
- Search Console reports Excluded by noindex tag
Fixed
- Raw HTML and rendered DOM agree
- No script touches the robots tag
- Page is indexed and receives organic visits
How FunnelGuard handles this
FunnelGuard covers this issue partly. On your journey pages, it reads the robots meta tag from the rendered DOM, meaning the page after scripts have run, so a noindex written by JavaScript is visible to it.
What it does not do: it does not compare the result against the raw server HTML, it does not check what Google has actually indexed, and it does not look at pages outside your journeys. It also cannot tell you which script wrote the tag.
To cover the rest by hand, use the steps above: compare View Source with the rendered DOM, run URL Inspection in Search Console for your key pages, search your code and tag manager for the script, and review the Pages report in Search Console for noindex exclusions on other URLs. The Free plan (1 site, 2 journeys, daily checks, no card) lets you try the journey checks, and a free read-only website audit is available.
Questions people ask
Can JavaScript add a noindex tag after the page loads?
Yes. A script can create or edit the robots meta tag in the page head after load. Google renders JavaScript, so it can see that noindex and may drop the page from its index.
Does Google obey a noindex added by JavaScript?
Generally yes, if Google renders the page and sees the noindex in the rendered DOM. Rendering can happen later than the first crawl, so the page may be indexed first and removed afterwards.
Why is my page indexed in View Source but excluded by noindex in Search Console?
Most likely a script adds noindex after the page loads, so the raw HTML looks clean. Compare View Source with the rendered DOM in DevTools and use URL Inspection to see the HTML Google rendered.
How do I find which script is adding noindex to my page?
Search all loaded files in DevTools (Sources, Ctrl+Shift+F) for noindex, and check Preview mode in your tag manager for Custom HTML tags. If that finds nothing, disable plugins or apps one at a time and re-run a console check of the robots meta tag.
Is it safe to remove noindex with JavaScript instead of fixing the HTML?
No. If the raw HTML contains noindex, Google may act on it before or without running your script. Put the correct robots tag in the server-rendered HTML.
How long does it take to get reindexed after removing the noindex?
It varies and nobody can promise a fixed time. After the fix, use URL Inspection to request indexing and monitor the Pages report in Search Console for the status change.
Can a tag manager tag cause a noindex on my live site?
Yes. A Custom HTML tag meant for staging can fire on production if its trigger is too broad. Check Preview mode and limit such tags to staging hostnames.
Related issues
- SEO-026noindex meta tag on a money or landing pageFix guide
- SEO-030noindex served only to Googlebot user agentFix guide
- SEO-032Conflicting robots directives (index and noindex both present)Fix guide
- SEO-029noindex added sitewide by a CMS setting ('Discourage search engines' in WordPress)Fix guide
- SEO-028noindex on pages other than the journey landing page (category, blog, home)Fix guide
- SEO-038noindex page also blocked in robots.txt so the noindex is never seenFix guide