Skip to main content
25 votes
Accepted

Do search engines perform JS rendering while crawling?

Google and Bing now render JavaScript when crawling websites. However, there is a lot that can go wrong in that process. The first step you should take in debugging the problem is to sign up for ...
Stephen Ostermiller's user avatar
11 votes

Pagespeed Insights reports that Google Analytics is blocking main thread in page load

GA4 uses Google Tag Manager to load Google Analytics, which means a bigger hit to your site's performance. To minimize the performance impact, here are some things I did. Use preconnect Use preconnect ...
Patrick Kenny's user avatar
9 votes
Accepted

Server-side rendering for search engines only (SEO)

Can I just send pre-rendered HTML, using phantomjs or other headless browser, to the google bot? In short... no you shouldn't. Google's stance on differing versions for visitors and search bots is ...
Simon Hayter's user avatar
8 votes
Accepted

restricting Google Maps js API keys to just my domain

Google changes this around every now and then, and whenever they do I have to 're-find' where each of the settings are. So you're not alone! You're right that a browser key is essentially 'public' ...
Tim Malone's user avatar
  • 1,256
7 votes

Most website visitors don't have Java enabled

Java != Javascript Javascript is a scripting language supported by the overwhelming majority if interactive browsers. Note that I said Interactive browsers - most bots will have extremely limited - if ...
davidgo's user avatar
  • 8,104
6 votes

Tracking logged in vs. non-logged in users on the same URL in Google Analytics

Use custom dimensions in Google Analytics. First, navigate to the "admin" section of Google Analytics' web portal, click "Custom Definitions", then "Custom Dimensions" under the property you're ...
Flimm's user avatar
  • 1,458
6 votes

Are Googlebot and other search engine crawlers able to detect if element is hidden after page load by JavaScript?

Googlebot now renders pages and views the page as a user sees it when it loads, including applying CSS and running JavaScript. Google will detect text that is hidden using either CSS or JavaScript. ...
Stephen Ostermiller's user avatar
6 votes

How to hide h1 and h2 tags using JavaScript while still having them for SEO

You can't hide h1 and h2 tags (or any text for that matter) and still have them apply positively to SEO. For several years now, Google has been trying to index precisely what the user sees. Google is ...
MrWhite's user avatar
  • 42.9k
6 votes
Accepted

Does Google count external Javascript or CSS files as backlinks?

Those are not links so they aren't counted as such. They're URLs of resources which are very different things. Hosting such a resource offers no direct SEO value but being known as a reliable host can ...
John Conde's user avatar
  • 86.3k
6 votes
Accepted

Do cryptocurrency webminers in a blog violate adsense policies?

Google's Adsense policy does not touch upon Crypto Currency Browser miners directly but it is clear that either malware or anything else that interferes with site navigation is considered a breach of ...
Simon Hayter's user avatar
6 votes
Accepted

Do I need to add the Google Tag Manager if I already have Google Analytics?

you can leave the global site tag tracking code snippet on your site, just do not also configure tags for GA pageview tracking within GTM. If it were me, I would remove the global site tag tracking ...
Bronwyn V's user avatar
  • 3,433
6 votes
Accepted

DOMContentLoaded vs. 'load' event vs. "Finish"

Many web pages that make requests using JS are never really fully loaded, because they can always request more assets seconds, minutes or even hours later, either to update the page (think like Gmail) ...
Maximillian Laumeister's user avatar
5 votes

How do I stop Google from indexing AJAX calls within Javascript?

I would put the Ajax function into robots.txt: Disallow: /somepage/AjaxFunction.aspx That will prevent Google from crawling it. Google doesn't typically index URLs it can't crawl. It will only ...
Stephen Ostermiller's user avatar
5 votes
Accepted

Is bad for SEO if browser need to run synchronous JS to get content?

Google doesn't care about the name of the tags in your body section - the crawler renders the site using chrome itself (including synchronous js) so it cares for whatever is printed to the screen. You'...
bArmageddon's user avatar
5 votes
Accepted

What are the benefits of utilizing a Web Server vs opening an HTML file directly via your browser

I tend to use a development server rather than file:/// URLs even when developing static sites. There are quite a few things that don't work from file:/// URLs. Just the first two points in my list ...
Stephen Ostermiller's user avatar
5 votes
Accepted

Delete Firefox JavaScript console history?

Enter this in the console: clearHistory() New in Firefox 39. Just like a normal command line, the console command line remembers the commands you've typed. Use this function to clear the console's ...
Geremia's user avatar
  • 201
5 votes

How can I track button click in google analitycs?

You are using gtag.js tracking code. Syntax for event tracking for gtag.js is: gtag('event', 'action', {'event_category': 'category', 'event_label': 'label', 'value': value}); If it does not ...
Bronwyn V's user avatar
  • 3,433
5 votes

How to pass JavaScript errors to Google Analytics using Google Tag Manager

Yes, the article is not quite complete. Any trigger has to be matched with a tag, in this case a Universal Analytics Event tracking tag (I do not believe there is another appropriate way to send it). ...
Reve's user avatar
  • 2,041
5 votes

Do I need to add the Google Tag Manager if I already have Google Analytics?

You need to add your Google Tag Manager code in your website. Then, you have two options: Leave it, don't do anything else. Your Google Analytics code will remain as it is and FB Pixel will be added ...
Pablo Santamaria's user avatar
5 votes

Does using onclick to redirect parameters impact SEO?

Based on Links Crawable Guidelines, the link will be crawled as https://www.example.com/, because Google can not follow link from onclick attributes. Google search central says: Google can follow ...
Muhammad Dyas Yaskur's user avatar
5 votes

How to improve page speed of a site built with Prismic

I work on the Developer Experience team over at Prismic, so I might be able to help answer your question! When I run some of these sites through PageSpeed insights, it's true that some aren't scoring ...
Alex Trost's user avatar
4 votes

How do I stop Google from indexing AJAX calls within Javascript?

Do not add X-Robots-Tag "noindex" in the AJAX function. That may block the main html page. We thought it would be a good idea, we did it in a project and what happened is that the AJAX portion of the ...
Gari CodeSyntax's user avatar
4 votes
Accepted

Can Google crawl dynamic structured data added in a window.onload() event?

<script src="https://example.site.com/rich-snippet/dist.js" defer=""></script> <script> window.addEventListener('load', function() { richSnippet(); }); </script>...
breakworm's user avatar
4 votes
Accepted

Should I use the 'noreferrer' attribute on my website links (to open in a new window) as a safety measure?

You only need to use one or the other. From Google tools for web developers -- Links to cross-origin destinations are unsafe: rel="noopener" prevents the new page from being able to access the ...
Stephen Ostermiller's user avatar
4 votes
Accepted

How to disable .htaccess file using JavaScript?

You can't. There isn't a way for a very good reason. The htaccess file cannot and should not ever be modified by the client. If it were possible to implement a workaround to that, you would have ...
GeoffAtkins's user avatar
  • 2,277
4 votes
Accepted

Does Googlebot crawl JS or JSON inside an HTML page?

Googlebot is likely to discover and crawl URLs found either in JavaScript or JSON. Googlebot has been doing this for many years, well before it could execute JavaScript. It appears it uses ...
Stephen Ostermiller's user avatar
4 votes
Accepted

How JSON works in HTML Script Tag regarding SEO Search availability?

You're making a mistake when you talk about JSON in this story. JSON is just a format and it plays exactly no role here. What is more important is JS rendering. Also, you're showing the source of your ...
BNazaruk's user avatar
  • 1,862
4 votes
Accepted

Core web vitals - LCP is being recounted on element outside viewport

How Chrome Measures LCP At the start of page load, the browser begins a stopwatch to track time it takes to see the largest content on the page. Chrome paints content in a series of stages. ...
Mike Ciffone's user avatar
  • 6,474

Only top scored, non community-wiki answers of a minimum length are eligible