There’s one technical SEO thing on modern websites that use a lot of JavaScript that I’ve been stumbling upon quite often lately.
It’s these “buttons.” For example, when clicking a button, something pops up in a modal or more content appears on the site — like reviews or comments. Sometimes this button would need to have a link as well.
The problem is that the info behind these buttons is often unreadable to Google, because Google can’t click buttons and look at what’s behind them — it follows links and reads the source code. So a site might have lots of user-generated content in the form of comments or reviews that Google can’t read and then not index it.
How to check?
The easiest way to check if Google can read what’s behind the button is to do a Google site search for that URL using a text snippet from the content behind the button — e.g. a review or comment that only becomes visible after clicking.
It can look like this:
site:https//:www.slowflowergarden.com “Beautiful red flower bouquet!”
Also check:
– if the content is found in the source code
– the rendered version in Search Console
– what happens when you block JavaScript — is the content still there?
– what’s visible in Inspector view (rendered version)
– does the button have a link (e.g pagination link)
How to fix?
– Preferably, add the content or the link behind the button directly to the source code.
– Alternatively, if you can’t (or don’t want to), add the content to the DOM tree so it’s there on the first page load, before the user clicks anything. If buttons need to link somewhere, make sure the link is also in the DOM tree.
Whichever option you go with, always check after publishing that Google can find and index the content behind the buttons.
What will happen after the fix?
– Improved rankings
– More user-generated content = more EEAT
– Better visibility for long-tail keywords
– More organic traffic to your site
It’s usually pretty easy for a developer to fix — and it can have a big impact on SEO.