Why is Gatsby JS Good for Google Rankings?
Tags: webdev, gatsby, react, javascript
Published: 2020-09-18 12:34:10

<p>SEO, which stands for Search Engine Optimisation), doesn't seem to get old — it's just different every year. Google changes its Search Algorithm and Ranking System every once in a while, adding new ranking factors or modifying existing ones. And since 2018, the page speed is one of them.</p>
<p>However, there are more: content relevancy, mobile-friendliness, user experience, on-page optimisation... There are more than 200 of them in total. It's mind-blowing, isn't it?</p>
<p>However, you don't have to take them all into account — focus on the most important ones.</p>
<p>And if you are wondering how to do that and create a website with the highest chances to rank high, consider Gatsby.&nbsp;</p>
<p>Keep reading to check why!</p>
<h2><strong>What is SEO?</strong></h2>
<p>Search Engine Optimisation (SEO) is a set of practices aimed to make a particular website look better and better in the eyes of Google. In other words, SEO is about improving the quality and quantity of website's traffic coming through search engine results pages (SERPs).</p>
<p>Search engine result page, on the other hand, is a page that displays mainly (but not only) results returned by a search engine like Google as a response to query search such as "online shopping" or "front-end development agency".</p>
<h2><strong>Why does SEO matter?</strong></h2>
<p>SEO helps companies bring valuable, organic traffic to their websites which is the first step towards getting new clients and increasing revenue. The better SEO-optimised the site is, the higher it's ranked in SERPs. And the higher the ranking is, the bigger the traffic.</p>
<p>The main difference between organic traffic (brought by SEO) and paid traffic (brought by money) is that the first one is free, forever. However, great SEO has more benefits than just saving money:</p>
<p><strong>It drives the quality traffic to your website</strong>&nbsp;— instead of reaching out to people whether they want to or not (interruption marketing), SEO focuses on making it easy for them to find you when they want to (permission marketing).</p>
<p><strong>Organic results get more clicks than paid ads</strong> — it's hard to tell why that is, but it doesn't alter the statistics: <a href="https://www.advancedwebranking.com/blog/google-organic-ctr/#ctr-study" target="_blank" rel="noreferrer noopener nofollow">over 70% of searches</a> end in clicking an organic result on the first page.</p>
<p><strong>SEO supports Public Relations efforts</strong>&nbsp;— one of the main elements of SEO is link building, which is about earning links from industry-respected publications and other relevant websites. On the other hand, featuring in such publications and being mentioned by influencers is a primary point of PR strategy. This presents an excellent opportunity to get in front of new customers through, for example, guest posting.</p>
<p><strong>It helps you to overtake the competition</strong> — SEO is an essential part of most marketing strategies which means there is a huge chance that your competition is already fighting for better rankings. However, with well-prepared and well-executed SEO efforts, you can catch up with them or even surpass them.</p>
<h2><strong>Main SEO ranking factors</strong></h2>
<p>There is a legend circulating in the marketing world that there is a man who knows all SEO ranking factors used by Google. However, no one ever saw him.</p>
<p>Luckily, you don't have to know them all – only the main ones. But since giving specific SEO advice is not our goal here, we will just scratch the surface to provide you with an overview.</p>
<h3><strong>Accessibility</strong></h3>
<p>All your efforts to rank high will be for nothing if your website is not visible to search engine crawlers. These are robots that are crawling through the Internet to index websites. If the specific site is not indexed correctly, it won't be displayed in search results.</p>
<p>What you have to do is create robots.txt file and website's sitemap. It's a confirmation of your site's accessibility. However, you can go one step further by submitting your website to Google through Google Search Console.</p>
<h3><strong>Backlinks</strong></h3>
<p>This is one of the most crucial SEO ranking factors, if not the most crucial one. As a reminder, backlinks are links to one website inserted on another website. The more backlinks you earn, the better it is for your website's SEO.</p>
<p>However, it's more complicated than it looks like. Every single backlink and its effect on SEO is influenced by other factors like relevancy or domain authority.</p>
<h3><strong>Mobile-friendliness</strong></h3>
<p>Mobile-friendliness (or responsiveness) is a ranking factor for both mobile and desktop searches. If your website fully adapts to a visitor's device — whether it's a small-screen mobile phone or big-screen TV — it means that it's mobile-friendly (or responsive). And this is very much welcomed by Google.</p>
<p>You can check if your website is mobile-friendly with <a href="https://search.google.com/test/mobile-friendly" target="_blank" rel="noreferrer noopener nofollow">Google's official tool</a>.</p>
<h3><strong>On-page optimisation</strong></h3>
<p>All efforts within the website that are intended to improve the website's position in search engine results are called on-page optimisation. Among them are: creating proper title and meta tags, using the right keywords, optimising images, writing original and valuable content.</p>
<h3><strong>Page speed (desktop and mobile)</strong></h3>
<p>Page speed has been a ranking factor for a decade now. And two years ago it started to affect not only desktop searches but also mobile searches. However, don't treat it like a challenge to beat competitors by trying to make your website load a few milliseconds faster. Instead, make it fast enough, so it won't affect the user experience negatively.</p>
<p>One more thing: according to Google's research, one-third of visitors will leave your website if page load time goes from one to three seconds. If it takes longer, it's even worse.</p>
<h3><strong>User experience</strong></h3>
<p>Would you come back to a place where you have had a terrible experience? Doubtful. The same thing goes for websites — the first impression makes all the difference. If the user experience is awful, it's likely you won't revisit it.</p>
<p>While it's not clear how exactly Google measures user's satisfaction from visiting a particular website, they gave some suggestions about what's essential from the UX perspective:</p>
<ul><li>Content that's useful and easy to read</li><li>Design that's responsive and responds to users' needs</li><li>Well-organised site architecture</li></ul>
<h2><strong>Dynamic site vs static site: which one is better for SEO?</strong></h2>
<p>There is one more thing to consider: what kind of website should you choose to raise your chances of ranking high in search engine results pages. First of all, there are two main website types — dynamic site and static site.</p>
<h3><strong>What is a dynamic site?</strong></h3>
<p>Dynamic sites allow users to interact with the content posted on a website. That content is being generated in real-time, which means it can be different for different users, depending on their location, device, time zone, or even network.</p>
<p>A dynamic website can use client-side scripting (the browser executes code), server-side scripting (the server runs code) or a combination of both.</p>
<p>A good example of such websites are those built using a Content Management System (CMS) like WordPress or Drupal.&nbsp;</p>
<h3><strong>What is a static site?</strong></h3>
<p>Static websites, on the contrary, offer the same content for every visitor, regardless of their browser's language or other preferences. For every page, there is a specific HTML file on the server that contains the content of this page. Such a website is pre-rendered and is not meant to be regularly updated because it requires some HTML knowledge to edit source files.</p>
<p>A good example of such websites is simple business websites created using static site generators (SSG) like Gatsby.</p>
<h3><strong>Which one does Google prefer?</strong></h3>
<p>While both types serve different purposes and require different skills, let's take a look at dynamic sites and static sites from Google perspective.</p>
<h4><strong>Static sites are faster.</strong></h4>
<p>Page load speed is one of the leading SEO ranking factors, which also affects user experience in either a good or bad way. Static sites are faster than dynamic sites because they are pre-rendered. Pre-rendering means that your website is generated as a set of static files in advance, not in real-time.&nbsp;</p>
<h4><strong>Static sites are easier to index.</strong></h4>
<p>Static websites consist of HTML and CSS files which are extremely easy to read and index by Google crawlers. Another thing that helps with indexation is a simple sitemap which is recommended by all search engines, including Google.</p>
<h4><strong>Static sites are easier to optimise</strong>.</h4>
<p>When you decide to choose a static site, you gain total control over SEO. You can customise any page of your website in any way you want. In a case of dynamic websites, you need to install a plugin or two to help you with SEO efforts.</p>
<h4><strong>Static sites are less expensive to host and maintain</strong>.</h4>
<p>Since static sites consist of simple HTML files, they need much less space on the hosting server than dynamic sites. Also, such a website won't use much of the monthly transfer limit.</p>
<h2><strong>What is Gatsby?</strong></h2>
<p>If you are considering creating a static site, Gatsby may be your choice of tool to do so. It is a free and open-source framework created with React, helping developers to build blazingly fast sites and apps. Gatsby is also called static site generator (SSG).</p>
<h2><strong>Why is Gatsby good for SEO?</strong></h2>
<p>It's time for the most important part of this article. I haven't jumped straight to that from the beginning because I wanted to explain the context. So far, you found out:</p>
<ul><li>what is SEO</li><li>what does it matter</li><li>main SEO ranking factors</li><li>which one is better for SEO: dynamic site or static site</li></ul>
<p>It helped you to understand the whole picture better, right?</p>
<p>Now it's time to find out why Gatsby is good for SEO.</p>
<h3><strong>Accessibility</strong></h3>
<p>Web accessibility means that websites, tools and technologies should be designed to be accessible for everyone, especially for those with permanent or temporary disabilities. When it comes to Gatsby and its accessibility, WebAIM (Web Accessibility in Mind, non-profit organisation) recognised Gatsby as the most accessible web framework.</p>
<p>Gatsby uses different practices to make its websites as much accessible as possible:</p>
<ul><li><strong>Accessible routing</strong> — the main feature of every website is navigation, and accessible routing takes care of that. Thanks to it, you can, for example, use a keyboard to navigate through the website. Also, Gatsby manages page announcements on page change.</li><li><strong>Building HTML pages by default</strong> — since it's using Node.js environment to compile pages, you don't have to worry about progressive page enhancement. Progressive enhancement means that the core page content is loaded before anything else from the server.</li><li><strong>Linting using a plugin</strong> — Gatsby uses&nbsp;an <em>eslint-plugin-jsx-a11y</em> package that reduces the time needed to find accessibility errors. This plugin, among other things, encourages you to add alternative text to all images.&nbsp;</li></ul>
<h3><strong>Page metadata</strong></h3>
<p>Gatsby gives you full control over the website's content and structure, and consequently, over the SEO of this website. You can add metadata like page titles, meta descriptions and alt text, which helps search engines to understand the content on your website and when to display your site in search results.</p>
<p>To add metadata to your website, you can use react-helmet components. Remember to add Gatsby React Helmet plugin to support SSR (server-side rendering).</p>
<h3><strong>Performance and speed</strong></h3>
<p>Gatsby is all about performance and speed. It comes with built-in features like rendering to static files or progressive image loading which are responsible for making Gatsby website fast. According to 2018 Google's update, site speed became the new ranking factor, and faster websites will likely rank higher than the slower ones.&nbsp;</p>
<p>However, you should still create content that's valuable and relevant to visitors, because the slower but more relevant site may rank higher than the faster ones.</p>
<h3><strong>Structured data</strong></h3>
<p>Structured data is what Google looks for on the web to understand the website's content. This is also its source of general information about the web and the world.</p>
<p>The better Google understands the content, the more relevant search results are. In other words, if you use structured data on your website, it helps you to rank higher.</p>
<p>In Gatsby, you can add structured data snippets with react-helmet in the JSON-LD (JavaScript Object Notation for Linked Data) format, which is embedded either in the page head or page body.</p>
<h3><strong>User experience</strong></h3>
<p>All the points made above ensure great user experience to visitors. And it's not just about the site speed — with Gatsby you can create fully customised websites that are accessible to everyone, easy to find and navigate, and visually attractive.</p>
<h2><strong>Examples of Websites built with Gatsby</strong></h2>
<p>Many well-known companies decided to build their websites using Gatsby — Airbnb, Bitcoin.com, Braun, Spotify, to name a few. However, there is no limitation on who can use Gatsby because startups and small companies also choose it.</p>
<p>Check below examples to see how such websites look and perform:</p>
<ul><li><a href="https://airbnb.io/" target="_blank" rel="noreferrer noopener nofollow">Airbnb Engineering &amp; Data Science</a></li><li><a href="https://bitcoin.com" target="_blank" rel="noreferrer noopener nofollow">Bitcoin.com</a></li><li><a href="https://ca.braun.com/en-ca" target="_blank" rel="noreferrer noopener nofollow">Braun</a></li><li><a href="https://frame.io" target="_blank" rel="noreferrer noopener nofollow">Frame.io</a></li><li><a href="https://hopper.com" target="_blank" rel="noreferrer noopener nofollow">Hopper</a></li><li><a href="https://spotify.design" target="_blank" rel="noreferrer noopener nofollow">Spotify.design</a></li><li><a href="https://frontend-day.com" target="_blank" rel="noreferrer noopener">Frontend Day conference</a> created by Pagepro</li><li><a href="https://jsminds.com" target="_blank" rel="noreferrer noopener">JS Minds</a> created by Pagepro</li></ul>
<p>Many well-known companies decided to build their websites with Gatsby — like Braun, Spotify and AirBnb, just to name a few.</p>
<h2><strong>Alternatives to Gatsby</strong></h2>
<p>We highly recommend Gatsby to build static sites, but we also would like to help you make a fully informed decision. Because of that, we wrote about Gatsby alternatives — you can read about them <a href="https://pagepro.co/blog/is-gatsbyjs-the-best-framework-for-building-static-websites-what-are-the-other-alternatives/" target="_blank" rel="noreferrer noopener">here</a>.</p>