Moving your website to HTTPS / SSL: tips & tricks

In 2014, we decided to switch over to the (now) commonly-used HTTPS to encrypt sensitive data that’s being sent across our website. This post describes some useful tips based on our own experiences that might come in handy if you’re considering switching. 

Optimize your site for search & social media and keep it optimized with Yoast SEO Premium »

Yoast SEO for WordPress pluginBuy now » Info

A little backstory

Back in 2014 HTTPS became a hot-topic after the Heartbleed bug became public. This bug allowed people with ill intent to listen in on traffic being transferred over SSL/TLS. It also gave them the ability to hijack and/or read the data. Luckily, this bug got patched quickly after its discovery. This incident was a wake-up call that properly encrypting user information over the internet is a necessity and shouldn’t be an optional thing.

To emphasize the importance of encrypting sensitive data, Google Chrome (since January, 2017) displays a clear warning next to the address bar whenever you visit a website that doesn’t encrypt – potential – sensitive data, such as forms.

How do I switch?

Because it’s important that your data is safe, we took steps in 2014 to ensure that we have SSL-certificates across our own websites. If you decide to switch (you really should!), there are a few things that you need to take into account to ensure your website fully works as intended once you’re done.

  • You need to change all your internal links. This also means updating links to assets (where necessary). Make sure to go through your theme and alter references to CSS, images and JavaScript files. Additionally, you can change all your links to start with // instead of https:// which will result in protocol-relative URLs.
  • Ensure your CDN supports SSL as well. We make use of MaxCDN, which allows you to easily set up SSL on your CDN subdomain.
  • There are various levels of SSL that you can choose from, each with their own pros and cons. You will find more information about that later on.
  • Ensure you have a canonical link present in the <head> section of your website to properly redirect all traffic coming in from http:// to https://.

Google also published a handy guide on how to move to HTTPS without massively impacting your ranking, which can be found here.

How does this influence my rankings?

Like stated in the previous section, moving from HTTP to HTTPS can influence your rankings slightly if you don’t plan accordingly. However, after you switch over to HTTPS, your rankings will actually improve over time. Google announced in 2014 that having an SSL certificate will be considered a positive ranking factor, so it’s worth the investment.

To make sure Googlebot can re-index your website more rapidly after the move, make sure you migrate to https:// during low-traffic hours. This way Googlebot can use more of your server’s resources. Just take into account that a medium-sized website might take a while to regain rankings. Have a sitemap? Then Googlebot might be able to recalculate and re-index your website even faster.

Setting up HTTPS & SSL on your server

Generally speaking, hosting providers have a service to allow you to enable HTTPS/order a certificate. There are a few types of certificates you can choose from, which differ in a few ways. Every variant also has their own price tag, so before purchasing one, make sure that you go with a certificate that fits your needs and budget!

If you’re a bit strapped for cash and tech-savvy, go take a look at Let’s Encrypt to acquire a free(!) certificate.

If you run and manage your own web server, there are a few things that you’ll have to enable in your server configuration before being able to use SSL certificates. This tutorial explains what steps to take to get a certificate running on your server.

OCSP stapling

Having to check the validity of an SSL certificate can result in a small hit in loading speed. To overcome this, you can make use of OCSP stapling. OCSP stapling is a feature that enables the server to download a copy of the certificate vendor’s response when checking the SSL certificate. This means that once a browser connects to the server, it checks the validity of the certificate based on the copy on the server instead of having to query the certificate vendor itself, resulting in a significant performance improvement.

Apache

Before enabling OCSP stapling on your Apache server, please check that you’re running version 2.3.3+ of Apache by running the command apache2 -v (or httpd -v) on your server. Lower versions of Apache do not support this feature.

If you went through the process of setting up HTTPS on your server as described in the ‘Setting up HTTPS & SSL on your server’ section, then you should have come into contact with a VirtualHost configuration specifically made for usage with HTTPS/SSL.

In that file, take the following steps:

  1. Inside the <VirtualHost></VirtualHost> section, you should add SSLUseStapling on.
  2. Just above the <VirtualHost></VirtualHost> section, add SSLStaplingCache shmcb:/tmp/stapling_cache(128000)
  3. Check that the configuration is still valid by running apachectl -t. If so, reload Apache by running service apache2 reload.

Nginx

Nginx also supports OCSP stapling. Before editing the server configuration, please check that you’re running version 1.3.7+ of Nginx by running the command nginx -v on your server. Lower versions of Nginx do not support this feature.

If you went through the process of setting up HTTPS on your server as described in the ‘Setting up HTTPS & SSL on your server’ section, then you should have come into contact with an Nginx configuration specifically made for usage with HTTPS/SSL.

In that file, add the following lines in the server {} section:

ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/ssl/private/ca-certs.pem;

The last line references a file that contains a list of trusted CA certificates. This file is used to verify client certificates when using OCSP.

After adding these lines to the file, check that the configuration is still valid by running service nginx configtest. If so, reload Nginx by running service nginx reload

Become a technical SEO expert with our Technical SEO 1 training! »

Technical SEO 1 training$ 199 - Buy now » Info

Strict Transport Security header

The Strict Transport Security Header (HSTS) is another handy feature that basically enforces browsers to use the HTTPS request instead of the HTTP equivalent. Enabling this feature is relatively painless.

Apache

If you’re running Apache, first enable the Apache Headers module by running a2enmod headers. After this, it’s only a matter of adding the following line to your VirtualHost configuration (in the <VirtualHost></VirtualHost> section) that you set up earlier for HTTPS:

Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"

Reload the Apache service and you’re good to go!

Nginx

Nginx requires you to add the following line in the server{} section of your server configuration file:

add_header Strict-Transport-Security max-age=31536000;

Testing

To see if your SSL certificate is working properly, head over to SSL Labs, fill in your domain name and see what kind of score you get.

Redirecting URLs

To ensure requests are properly redirected to the HTTPS URL, you need to add an extra line to you configuration. This way, traffic that tries to visit your website over HTTP, will automatically be redirected to HTTPS.

Apache

In your default VirtualHost configuration (so the one that’s used for HTTP requests), add the following to ensure URLs get properly redirected:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

As with the other changes we made before, don’t forget to reload Apache!

Nginx

In Nginx, change the default configuration file that was used for HTTP requests and alter it as such:

server {
    listen 80;
    server_name your-site.com www.your-site.com;
    return 301 https://your-site.com$request_uri;
}

Don’t forget to reload Nginx before testing these changes.

Conclusion

“Should I switch over to HTTPS?” Short answer: Yes. Using HTTPS ensures that private (user) information is being sent across the web in a more secure manner. Especially if you’re dealing with monetary transactions, HTTPS is a must.

What type of certificate you end up going with, depends on your specific use case and budget. Make sure to properly research your options beforehand.

Read more: ‘WordPress security in a few easy steps’ »

SEO for a new website: the very first things to do

How does a new website start ranking? Does it just magically appear in Google after you’ve launched it? What things do you have to do to start ranking in Google and get traffic from the search engines? Here, I explain the first steps you’ll need to take right after the launch of your new website. Learn how to start working on the SEO for a new website!

Optimize your site for search & social media and keep it optimized with Yoast SEO Premium »

Yoast SEO for WordPress pluginBuy now » Info

First: you’ll need to have an external link

One of my closest friends launched a birthday party packages online store last week. It’s all in Dutch and it’s not WordPress (wrong choice of course, but I love her all the same :-)). After my friend launched her website, she celebrated and asked her friends, including me, what they thought of her new site. I love her site, but couldn’t find her in Google, not even if I googled the exact domain name. My first question to my friend was: do you have another site linking to your site? And her answer was ‘no’. I linked to her site from my personal site and after half a day, her website popped up in the search results. The very first step when working on SEO for a new website: getting at least one external link.

Why do you need an external link?

Google is a search engine that follows links. For Google to know about your site, it has to find it by following a link from another site. Google found my friend’s site because I put a link to that site on my personal site. When Google came around to crawl my site after I put the link there, it discovered the existence of my friend’s site. And indexed it. After indexing the site, it started to show the site in the search results.

Read more: ‘What does Google do?’ »

Next step: tweak your settings…

After that first link, your site probably will turn up in the search results. If it doesn’t turn up, it could be that the settings of your site are on noindex or is still blocked by robots.txt. If that’s the case, you’re telling Google not to index your site. Sometimes developers forget to turn either of these off after they finished working on your site.

Some pages are just not the best landing pages. You don’t want people landing on your check out page, for instance. And you don’t want this page to compete with other – useful – content or product pages to show up in the search results. Pages you don’t want to pop up in the search results ever (but there aren’t many of these) should have a noindex.

Yoast SEO can help you to set these pages to noindex. That means Google will not save this page in the index and it’ll not turn op in the search results.

Keep reading: ‘The ultimate guide to the robots meta tag’ »

Important third step: keyword research

My friend’s site now ranks on her domain name. That’s about it. She’s got some work to do to start ranking on other terms as well. When you want to improve the SEO for a new website you have carry out some proper keyword research. So go find out what your audience is searching for! What words do they use?

If you execute your keyword research properly, you’ll end up with a long list of search terms you want to be found for. Make sure to search for those terms in Google yourself. What results are there already? Who will be your online competitors for these search terms? What can you do to stand out from these results?

Read on: ‘Keyword research: the ultimate guide’ »

Learn how to write awesome and SEO friendly articles in our SEO Copywriting training »

SEO copywriting training$ 199 - Buy now » Info

And then: write, write, write

Then you start writing. Write about all those topics that are important to your audience. Use the words you came up with in your keyword research. You need to have content about the topics you want to rank for to start ranking in the search results.

Read more: ‘How to write a high quality and seo-friendly blog post’ »

But also: improve those snippets

Take a look at your results in the search engines once you start ranking (the so called snippets). Are those meta descriptions and the titles of the search results inviting? Are they tempting enough for your audience to click on them? Or should you write better ones?

Yoast SEO helps you to write great titles and meta descriptions. Use our snippet preview to create awesome snippets. That’ll really help in attracting traffic to your site.

Keep reading: ‘The snippet preview: what it means and how to use it?’ »

Think about site structure

Which pages and posts are most important? These should have other pages and posts linking to them. Make sure to link to the most important content. Google will follow your links, the post and pages that have the most internal links will be most likely to rank high in the search engines. Setting up such a structure, is basically telling Google which articles are important and which aren’t. Our brand new text link counter can be a great help to see if you’re linking often enough to your most important content.

Read on: ‘Internal linking for SEO: why and how’ »

Finally: do some link building

Google follows links. Links are important. So get the word out. Reach out to other site owners – preferably of topically related websites – and ask them to write about your new site. If Google follows multiple links to your website, it’ll crawl it more often. This is crucial when you do the SEO for a new website, and will eventually help in your rankings. Don’t go overboard in link building for SEO though, buying links is still a no-go:

Read more: ‘Link building: what not to do?’ »

Adding JSON-LD structured data with Google Tag Manager

You’ve probably heard us talk a lot about structured data, Schema.org and JSON-LD. Schema structured data on your site can result in highlighted search results. In this article, we’ll show you how to implement structured data using the JSON-LD Schema.org markup on the pages of your site. Here, we’ll take a closer look at how to implement structured data with Google Tag Manager.

We’ve just launched a brand new training on structured data and SEO. This training has an introductory price of $119. On July 2, this will jump to the regular price of $149.

Want rich snippets for your site? Try our Structured data training »

Structured data training$ 119 - Buy now » Info

Structured data with Google Tag Manager

Google Tag Manager is a tool that can take your marketing to the next level without the need of a developer. It’s a tool that can easily add scripts or pieces of code to a page. There are several advantages to using Tag Manager to implement structured data.

For one, you can generate tags, triggers, and variables, which means that you can apply the same code again and again on different pages. For instance, if you have loads of recipes, you can create a tag with the variable “preparation time”, so the preparation time of every recipe will be taken from a recipe page. This means you won’t have to add the preparation time manually to the code of every single page. In the end, this will save you a lot of work.

In addition, Tag Manager features a preview mode, which allows you to check whether you successfully implemented your data immediately. Read the post Google Tag Manager: An Introduction to get started.

How Google Tag Manager works

First, you need to know about three important elements: Variables, Triggers and Tags. You can find these elements on the left-hand side of your workspace. A workspace is a place where you work on creating and adding pieces of code to your pages.

google tag manager structured data workspace

Tags

A tag is a piece of code that can be fired on a page of your website. You can put many things in a tag. For instance, you can add the Google Analytics tracking code in a tag. This tag will enable Google Analytics to track your website. Similarly, you can put your structured data code in a tag. In other words: a tag contains information as to what you want to add to a page.

Triggers

Tags only work when there’s a trigger attached. You need a way of telling Google Tag Manager under which condition a tag must be used, or fired, as we call it. If you have a structured data tag, the trigger tells Tag Manager on which pages to fire that tag. This is because it’s possible that not all your pages need a recipe structured data markup, for instance. Simply put, a trigger tells Tag Manager: “Please fire this tag on these pages, but not on these pages”.

Variables

Variables serve two functions. Firstly, triggers need variables to know whether or not to fire. Suppose Tag Manager runs on your page. If the value of the variable meets the conditions you set, the trigger will fire. This, in turn, allows the tag to work. Secondly, the variable provides Google Tag Manager with variable information. This means that the information can be different in different contexts. A Date Published, for example, will be different for every eBook you publish. If the trigger fires, Google Tag Manager will then fetch the specific value from the specific page it visits.

An example of a variable is the URL of a page, but you can use any element of a page as a variable. It could be an ‘Add to cart’ button, or the H1 of a page, for example. The most commonly used variables are predefined in Google Tag Manager. But things like buttons or the H1 are variables you have to define yourself. With variables, you can edit your code in such a way that it will take elements from the current page to use in a tag.

Adding JSON-LD to your site step by step

We’re going to guide you through implementing structured data on your pages. We’ll take the Schema.org type Course as an example. As stated, we’ll use JSON-LD markup. There are five steps to take:

  1. Make structured data
  2. Create tags and triggers
  3. Create variables
  4. Trigger your code
  5. Validate and publish

Step 1: Creating the structured data code

Produce structured data JSON-LD code, either by hand or by using Google’s Markup Helper. In this example, we’re using Course markup, which looks like this:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Course",
  "name": "Site structure training",
  "description": "Learn how to create site structure for your site that makes Google understand your site and makes visitors go where they need to be",
  "provider": {
    "@type": "Organization",
    "name": "Yoast",
    "sameAs": "https://yoast.com/"
  },
      "offers": {
        "@type": "Offer",
        "price": "99",
        "priceCurrency": "USD"
  }
}
</script>

After you’ve created your markup, you have to get it ready for Google Tag Manager with Yoast’s JSON-LD Script Helper tool. Paste your code and hit Submit. The tool will create a piece of code you can use in Google Tag Manager. Copy it. You’ll need it for your new tag.

Step 2: Creating tags in Tag Manager

You’re ready to make your tags and triggers. Follow the steps below:

  • Make a new tag and give it a name (Site structure training, for instance)
  • Click Tag Configuration and choose tag type: Custom HTML
  • Paste code from the script helper tool
  • Check Support document.write
  • Hit Save

google tag manager structured data tag configuration

Step 3: Creating triggers

You need to add a trigger, so it knows when to fire the tag. You can do this on the same screen you see in the screenshot above, or directly from the Triggers screen in the Workspace. Click on the Triggering space in your new tag and choose the correct Page View. Hit Save. Your snippet is now implemented as is (see below for working with variables).

If there are no triggers yet, you can add them on the same screen. If you want a trigger to a specific page, you can copy the relevant piece of the URL and add it to a new trigger. So if you only want to trigger a tag on this page: https://yoast.com/academy/course/site-structure-training/, you need to copy the part /academy/course/site-structure-training/.

Hit the New or + button to add a new trigger. Give it a name and click on Trigger Configuration. Choose Page View from the list of trigger types and click on Some Page Views. You can now choose when the tag should trigger and which conditions should be met before it’s possible. In our case, we want to trigger the tag on https://yoast.com/academy/course/site-structure-training/. That’s why we’ll choose Page Path and Equals from the dropdown, and paste the URL into the empty box.

google tag manager structured data trigger configuration

Step 4: Creating variables

Variables make it much easier to implement the same structured data on many different sites. The variables can be found on the left-hand side of the workspace as well. You’ll see all predefined variables. There’s also an option for user-defined variables. To create a variable, click on New. After that, take the following steps:

  • Name the variable
  • Click on Variable Configuration
  • Choose Variable type
  • In this example: DOM Element

The fourth step depends on the type of tag or trigger you want to create. In this example, we’ll use a DOM Element. A DOM Element is a piece of your page, like a DIV, HTML and BODY. In this example, the DOM Element is the H1, which is the most important heading of the page.

Once you’ve clicked on the DOM Element, you need to choose which method you want to use to select a page element with. In this case, we’ll use a CSS Selector. By simply entering h1 into the Element Selector, you’ve created a variable that takes the H1 of a page.

If you want to use the meta description of a page, enter meta[name=”description”] and that variable will add the meta description of your pages.

google tag manager structured data variable configuration

Once you’ve created these variables, you can use them in your tags.

google tag manager structured data meta description

As you can see, you can use the H1 variable for the “name” and Meta description variable for the “description”. Now, the Course Schema.org markup sends the right name and description to Google.

Variables make this method of implementing structured data flexible and scalable. This way, you produce code that can be used in many places, without having to add it manually or change it for every instance. You only have to set up the tags once.

Want rich snippets for your site? Try our Structured data training »

Structured data training$ 119 - Buy now » Info

Step 5: Test, saving and publishing

You’re ready to test your code. Tag Manager has a Preview mode that lets you test code before you publish it on a live site. Go to your Workspace to activate that mode.

In your browser, go to the page you’re implementing structured data on and refresh. You’ll see the Preview tab appear and this should show you the tags that fired. If you want to know more, you can go to the Window Loaded screen to see if your variables were executed properly. If all is well, your H1 variable should now show the same value that’s visible on the site (the title). Always test your code before publishing!

google tag manager structured data preview

If all the information displayed on this screen is correct, you can publish your tag. If there are still some flaws, go through the steps again.

To publish your tag, hit the Submit button you see at the top right. Give your version a descriptive name and press Publish. Once you’ve published your structured data tag, go to the Structured Data Testing Tool and enter the URL of the page that should now contain structured data. With this tool you can check if the structured data is implemented correctly:

google tag manager structured data end result

See no errors and warnings? Well done! If you do see errors, dive in more deeply and read what Google has to say about it.

Want to learn more about structured data? Try our brand new Structured data course!

Read more: ‘Structured data with Schema.org and JSON-LD: the ultimate guide’ »

New online SEO training: Structured data

If you want your search results to stand out from your competition’s, you’ll need rich snippets. You’ll want to pimp your results with 5 star reviews, stock information or location, for example. To get a rich snippet, you have to learn to implement structured data. Our latest SEO course will teach you exactly how to do just that! If you buy the online structured data course now, you’ll receive a major discount. You’ll only pay $119 instead of $149.

Want rich snippets for your site? Try our Structured data training »

Structured data training$ 119 - Buy now » Info

Practical course

The structured data course is a very practical course. We’ll first teach you some theory about SEO and why structured data is important, but then we’ll quickly dive into the practical implementation. If you buy our course, you’ll receive lots of screencasts and step-by-step examples on how to implement structured data on your own site. We’ll teach you the fancy (but hard way) to do it, but also the less elegant, quick-and-easy way. Everyone – you don’t have to be a developer! – will be able to get going with structured data after they’ve completed this course.

Watch the first video of the structured data training if you really want to know what this course has to offer:

What does the Structured data training contain?

The Structured data training consists of three modules. In the first module, we explain what structured data is and why it’s important. The second module is by far the largest and most important module. In this module, we explain exactly how to implement structured data on your site. The third module teaches you how to evaluate structured data and provides you with some useful tips.

The online course contains 6 training videos, lots of reading material and challenging questions after every lesson. The questions will test whether you really understood the material. We estimate that you’ll spend 8 hours (on average) on our course. You’ll really need to dive into the subject to fully understand this SEO topic. At the end of the course, you’ll receive a certificate and a badge to put on your site!

SEO basics: What are rich snippets?

Maybe you’ve heard about the concept of rich snippets. SEO experts seem to think everyone knows exactly what rich snippets are. But, for SEO newbies, a rich snippet is a really vague term. What are rich snippets exactly? Time to explain what rich snippets are, why they’re important for SEO and how you can get them for your site.

What are rich snippets?

A snippet is a result Google shows to the user in the search results. An example: I was searching for a good recipe for homemade ice cream and googled it. Google showed me a results list with normal snippets and rich snippets. A normal snippet usually looks like this:

Google shows the title in blue, the URL in green and a description of what the page is about. This is what we call the snippet, the thing Yoast SEO helps you to optimize with our snippet preview.

A rich snippet shows extra information between the URL and the description. A rich snippet looks like this:

In this snippet, a picture of the ice cream is added, you can see the rating of the recipe, the time it takes to prepare this type of ice cream and the number of calories it contains. A rich snippet contains much more information than the normal snippet does. That’s why we call it a rich snippet.

Why are rich snippets important for SEO?

Rich snippets stand out from the other snippets. They look much nicer and you’ll instantly know more, just by looking at them. You’ll know whether other people liked the homemade ice cream and how long it’ll take you to make it. Rich snippets are snippets that have a higher click-through rate. People like to click on rich snippets.

If the click-through rate of a snippet increases, you’ll get more traffic from that search result. Not because your position in the search engine changed, but just because more people click on your result. In the long run, rich snippets will have an effect on your ranking as well. As more people click on your result, Google will notice that people prefer your page above other ones. That’ll definitely improve your rankings in the long run!

How do you get rich snippets?

Google can show rich snippets if you add structured data to your site. Structured data is a piece of code in a specific format, written in such a way that search engines understand it. Search engines read the code and use it to create rich snippets.

Read more: ‘What is structured data’ »

Adding structured data to your website can be quite daunting. But we’re here to help! As of tomorrow, Yoast offers an online training to teach you how to implement structured data so Google can show rich snippets. We’ll show you different strategies (from beginner to more advanced levels), so that everyone will be able to get started with structured data and get those rich snippets!

Keep reading: ‘Structured data with Schema.org: the ultimate guide’ »

Ask Yoast: Use a 302 or 307 redirect?

Redirects serve multiple purposes. For every occasion there’s a specific redirect that works best. Some redirects seem quite similar though, for instance, the 302 or 307 redirect. You can both use them to temporarily point users to another URL. So we’re not surprised some people wonder what’s the exact difference. Let’s clarify this here!

WordPress specialist Marcel Bootsman, also known as Nostromo on Twitter, has send the following question to Ask Yoast:

Can you explain when to use a 302 or a 307 redirect when temporarily redirecting a URL?

Watch the video or read the transcript further down the page!

Become a technical SEO expert with our Technical SEO 1 training! »

Technical SEO 1 training$ 199 - Buy now » Info

When to select a 302 or a 307 redirect?

Let me explain when to use which one, if you need a temporary redirect:

“Well it’s actually quite simple. If the URL is really, really temporary
please do use a 307. Only use a 302 if you want the URL that you are redirecting
to show up in the search results with the content of the page that you are redirecting to.

So you have page A with a URL and you have page B with a content. You want the URL of page A to show up with the content of page B in the index. If that’s what you want use a 302. If that’s not what you want use a 307. And if something is not temporary but permanent use a 301 redirect and not anything else.

Good luck!”

Read more: ‘Which redirect should I use?’ »

Ask Yoast

In the series Ask Yoast we answer pressing SEO questions from followers. Need advice about the SEO of your website? Let us help you out! Send your question to ask@yoast.com.

Coming soon: Structured data training!

Do you want to increase chances people click on your page in the search results? Want to learn how to get those awesome rich snippets? Next week, we’ll launch our Structured data training. In this new training, you’ll learn how structured data can influence the appearance of your pages in the search results. After completing this course, you’ll be able to add structured data yourself, so Google can show a rich snippet.

Why take our structured data training?

A normal snippet of a recipe looks like this:

You see a title, a URL and a description of a page. If you add structured data to your page, Google (or another search engine) can transform your snippet into this:

So the structured data you add can show up in the snippet. For recipes you can add ratings and reviews, cooking time, calories and an awesome picture. Not only for recipes, but also for books, movies, articles, products etc. structured data exists.

Rich snippets let your page stand out from the other search results in Google. And if your page stands out in the search results, chances are much higher people will click on it.

Is adding structured data hard?

Adding structured data is not very hard, but you do need to know what you’re doing. After some training, everyone should be able to add structured data and get rewarded with those desired rich snippets!

We’ve created a very practical online training in which we take you through all the steps of adding structured data to a site. We’ll first explain the theory and then we’ll show you screencasts that will guide you through the steps you need to take. We’ll discuss multiple strategies you can use to add structured data to a website. Some strategies are more advanced (and more daunting) than others. At the end of the course, you’ll be able to add structured data in multiple ways. Just choose which strategy fits you best and start working on those awesome rich snippets yourself!

Want to buy our course?

The structured data training will be available as of June 29. You can purchase the course for the introductory price of $119 until July 2. You’ll get access to over 75 minutes of training videos, lots and lots of reading material and challenging quiz questions. If you finish our course, you’ll receive a certificate and a badge to put on your site. If you buy one of our courses, you’ll also get access to the Yoast Updates. These updates keep you in the loop about new trends in SEO and WordPress every 3 months.

Want to know more?

Check out the Structured data training and make sure you won’t miss the launch by subscribing to our newsletter!

Not the right training for you? We offer lots of other SEO courses. See which one fits your needs best!

What is an XML sitemap and why should you have one?

A good XML sitemap is a roadmap to all important pages of a website. This roadmap guides Google to all main content on a website. Having an XML sitemap can be beneficial for SEO, as Google can retrieve essential pages of a website very fast, even if the internal linking of a site isn’t flawless. Here, we’ll explain what XML sitemaps are and how they help you with your rankings.

What are XML sitemaps?

You want Google to crawl every important page of your website. But it can happen pages don’t have any – internal – links to them, which will make them hard to find. You can use an XML sitemap to make sure Google can find and crawl all pages you deem essential on your website. An XML sitemap contains all important pages of a site to help Google determine the structure of it:

XML Sitemap Yoast

The XML sitemap of Yoast.com

 

The XML sitemap above shows the XML sitemap of the Yoast website, which the Yoast SEO plugin created. If you read further down the article, we’ll explain exactly how our plugin helps you create the best XML sitemaps. If you’re not using our plugin, it could be that your own XML sitemap looks a bit different but it will work the same.

As you can see the XML sitemap of Yoast shows several ‘index’ XML sitemaps: …/post-sitemap.xml, …/page-sitemap.xml, …/video-sitemap.xml etc. This categorization makes a site structure as clear as possible. If you click on one of the index XML sitemaps, you’ll see all URLs in that specific sitemap. For example, if you click on ‘…/post-sitemap.xml’ you’ll see all the post URLs of Yoast.com (click on image to enlarge):

XML Post Sitemap Yoast

The post XML sitemap of Yoast.com

The date at the end of each line tells Google when we’ve last updated the post. This is beneficial for SEO because you want Google to crawl your updated content fast. When a date in the XML sitemap changes, Google knows that there is new content to crawl and index.

Sometimes it’s necessary to split an index XML sitemap because of the number of URLs in it. The limit to the number of URLs in one separate XML sitemap is set to 50.000 URLs. This means, for example, that if your website has over 50.000 posts, you should add two separate XML sitemaps for the post URLs. So, you’re actually adding another index XML sitemap. We’ve set the limit to 1.000 URLs in the Yoast SEO plugin to keep your XML sitemap loading fast.

What websites need an XML sitemap?

If we look at Google’s documentation, they say that XML sitemaps are beneficial for “really large websites”, for “websites with large archives”, for “new websites with just a few external links to it” and for “websites which use rich media content”.

We agree that these types of websites will definitely benefit from having an XML sitemap. However, at Yoast, we think an XML sitemap is beneficial for every website. On each website, you want Google to easily find the most important pages and to know when you’ve last updated those pages. That’s why we’ve added this function to the Yoast SEO plugin. 

Optimize your site for search & social media and keep it optimized with Yoast SEO Premium »

Yoast SEO for WordPress pluginBuy now » Info

Which pages should be in your XML sitemap?

How do you decide which pages you need to include in your XML sitemap? Always start by thinking of the relevancy of a URL: when a visitor lands on a specific URL, is it a good result? Do you want visitors to land on that URL? If not, that URL probably shouldn’t be in your XML sitemap. However, if you really don’t want that URL to show up in the search results you’ll need to add a ‘noindex, follow’ tag. Leaving it out of your XML sitemap doesn’t mean Google won’t index the URL. If Google can find it by following links, Google can index the URL.

Example 1: a starting blog

Let’s take the example of a new blog. The owner wants Google to find new URLs of the blog fast to make sure his target group can find his blog in Google. So it’s a good idea to create an XML sitemap right away. The owner has created some describing categories for the first posts and he has written the first posts. He has also set up some tags to start with. However, he doesn’t have enough content yet to fill the tag overview pages with. Since these tag overview pages contain “thin content”, it’s not valuable to show them to the visitors yet. It’s, therefore, better to leave the tag’s URLs out of the XML sitemap for now. In this case, the tag pages could also be set to ‘noindex, follow’ because you don’t want people to land on those URLs from the search results.

Example 2: media & images

Another example of an unnecessary XML sitemap – in most cases – is the ‘media’ or ‘image’ XML sitemap. Since your images are probably used within your pages and posts, the images are already included in your ‘post’ sitemap or your ‘page’ sitemap. Adding a separate ‘media’ or ‘image’ XML sitemap would be redundant. We recommend always leaving this one out of your XML sitemap. Only when images are your main business you can make an exception. When you’re a photographer, for example, you probably do want to show a separate ‘media’ or ‘image’ XML sitemap to Google.

How to make Google find your XML sitemap

If you want Google to find your XML sitemap fast, you have to add it to your Google Search Console account. You can find the sitemaps in Search Console by navigating to ‘Crawl’ and then clicking on ‘Sitemaps’. You’ll immediately see if your XML sitemap is already added to Search Console. If not, click on the ‘Add/Test sitemap’ button which you see on the right of the arrow in the image below.

Google Search Console XML Sitemap Yoast

The XML sitemap of Yoast is added to Google Search Console

 

As you can see in the image, adding your XML sitemap can be helpful to check whether all pages in your sitemap are really indexed by Google. If there is a big difference in the ‘submitted’ and ‘indexed’ number of a certain sitemap, we recommend analyzing this further. Maybe an error prevents some pages from being indexed or perhaps you should just add more content or links to the content that’s not indexed yet.

Yoast SEO and XML sitemaps

Because of the importance of XML sitemaps, we’ve added this functionality to our Yoast SEO plugin. XML sitemaps are available for both the free and the premium version of the plugin.

Yoast SEO creates an XML sitemap for your website automatically. You can find it by clicking on ‘XML Sitemaps’ in the sidebar of your WordPress install:

Yoast SEO tabs in WordPress backend

The XML Sitemaps tab in Yoast SEO

 

 

 

 

 

 

In the screen that follows you can enable or disable the XML sitemaps of your website. In addition to that, you can click on the ‘XML sitemap’ button to check your XML sitemap in your browser:

XML Sitemap settings in Yoast SEO

XML sitemap settings in Yoast SEO

In the tabs below the ‘enabled’ or ‘disabled’ toggle, you can find the different sitemaps you can in- or exclude from your XML sitemap: Users/Authors, Post Types and Taxonomies. On top of that, you can also exclude specific posts from the XML sitemap if you think the content of that post isn’t valuable enough.

Check your own XML sitemap!

Now you’ve read this complete post, you know it’s important to have an XML sitemap, because having one can help your site’s SEO. Google can easily access your most important pages and posts if you add the right URLs to your XML sitemap. In addition to that, Google can also find updated content easily, so they know if a certain URL needs to be crawled again. Lastly, adding your XML sitemap to Google Search Console helps Google find your sitemap fast and, besides that, it allows you to check for sitemap errors.

Now go check your own XML sitemap and see if you’re doing all of this correctly!

Read more: ‘WordPress SEO tutorial: definite guide to higher ranking’ »

Google Tag Manager: an introduction

Perhaps you’ve heard about it: Google Tag Manager. Google introduced this tool 5 years ago, a tool that would make marketers less dependent on developers and that would, therefore, speed up your marketing process. Google Tag Manager has evolved over the years becoming a more complete and easy to use tool. Here I want to explain why you should sign up today, if you aren’t using Google Tag Manager already. 

Become a technical SEO expert with our Technical SEO 1 training! »

Technical SEO 1 training$ 199 - Buy now » Info

Before I go on to introduce Tag Manager, I do want to say a word of warning. Tag Manager is a powerful tool, and like any power tool, it should be used with care. Don’t just add tags that look appealing to you but you don’t fully understand. For instance, you might bring in a tag that could harm your site because the code is not safe. Or use a tag that influences your data tracking. If you’re not sure or in doubt of a certain tag, have someone who knows JavaScript take a look at it. Luckily, Tag Manager has a great Preview and Debug mode that lets you validate code before you publish.

What is Google Tag Manager?

If you have closer look at the term Google Tag Manager, you can guess what it’s about. It’s a tool developed by Google to manage your tags. But then the next question arises: what’s a tag? A tag is a snippet of code. There’s a whole bunch of analytics and marketing tools out there that work with JavaScript code. For instance, the Google Analytics tracking code – the one you add to your site to track your site’s traffic with Google Analytics – is JavaScript code.

Did you ever had to wait for a developer to add a piece of JavaScript to your site? Or to test whether that code wasn’t harming your website? Then you know how much valuable time that can take. With Google Tag Manager you can add these pieces of JavaScript or tags yourself. Google Tag Manager even has the ability to test whether you’ve implemented the tag correctly.

Running every tag from Google Tag Manager has two big advantages. First of all, you’ll have an overview of the tags you’ve added. Secondly, you’re in full control of measuring the effects of your marketing efforts.

What can you use it for?

Because Google Tag Manager allows you to add JavaScript to your site, you can use it for a lot of things. You can use it to get more insight in the behaviour of visitors on your site – ‘events’ like clicking on a button – but also to get tags of third party tools on your site. It will even help you to add structured data to your pages!

Google Analytics and Tag Manager

One of the most used tags that’s managed in Google Tag Manager is the Google Analytics tag. Not only can you add the Google Analytics tracking code. You can use Google Tag Manager to create, for instance, custom dimensions, events or content grouping. This means that you can track if people click on your buttons, if they scroll down to a certain point on your page, if they watch your videos and so on. All the cool things you can do with Google Analytics events, can now be managed in Google Tag Manager. And you won’t need a developer for it!

Other third party tools

Google Tag Manager supports a lot of third party tags, like: Adwords, Adobe Analytics, Bing ads, Hotjar, Crazyegg and so on. You can find the complete list on the Google Google Tag Manager support forum. You can use Hotjar tags to finally get those heatmaps – a visual representation of where people click on your site – you wanted to have. Or run surveys and A/B tests on your site. Getting data like that can help you bring your conversion rate to the next level.

Google Tag Manager and structured data

But there’s more! You can also use Google Tag Manager to implement structured data on your site. Structured data is extra information you add to your page in a specific format. Google can show this information in the search results, which makes it more likely people click on your result and engage with your page.

At the moment, we’re working on a new and practical course about structured data. In this course, you’ll learn how structured data works and how to implement it with Google Tag Manager yourself. Don’t miss the launch and keep an eye on our newsletter!

Where to find Google Tag Manager?

Google is ubiquitous with its tools. If you visit: google.com/analytics/  you can see all tools Google has developed to help you with your marketing strategy. In addition to Google Analytics, there are tools to help you boost conversion or perform customer surveys. And, of course, there’s Google Tag Manager. You can sign up for free! Wait! Free, you say? Yes, free!! So what’s stopping you?

After you’ve signed up, you can create an account for your website, your iOS or Android app or your AMP pages:

Create a container in Google Tag Manager

Just provide the URL of your site as the container name and then select web – if you want to implement it on your website. After you’ve created this container, Google Tag Manager will ask you to add a piece of code in the <head> and <body> of the page. I promise, this is one of the few things you might need a developer for, when it comes to using Google Tag Manager.

install Google Tag manager on your site

Luckily, if you’re using WordPress, you can easily add the Google Tag Manager code using a plugin called DuracellTomi’s Google Tag Manager for WordPress. Please note that you only have to use the GTM-XXXX code.

If you’re using another CMS, please check out the quick install guide for more information on how to get started.

After you’ve inserted the Google Tag Manager code to your pages, you’re ready to create your own tags. This can be done in a so called workspace that looks like this:

So now you’re all set up and ready to add those tags to your site.

And now?

We’ll be doing more posts on Google Tag Manager soon. Explaining the practical side of things like how to create variables, triggers and tags, and how to implement structured data with it. We’ll also help you understand how to combine Google Tag Manager with Google Analytics to use it to its full extent. So stay tuned!

Read more: ‘How to use Custom Dimensions in Google Analytics’ »

What is structured data?

You might have heard about structured data, Schema.org, and JSON-LD. But what do these terms mean exactly? What is structured data? What does structured data do? And what does it have to do with SEO? For all of you who don’t know what structured data is: this post will make it clear to you!

Increase chances of Google showing rich results of your site in the search results: learn how to add structured data with our training on structured data and SEO.

What is structured data?

Structured data is code in a specific format, written in such a way that search engines understand it. Search engines read the code and use it to display search results in a specific and much richer way. You can easily put this piece of code on your website.

Imagine you have a website with a lot of recipes. If you add structured data to a page with a recipe, your result in the search engines might change. It will be much “richer” regarding content that’s shown. That’s the reason we call these results rich results or rich snippets. This is what a rich result looks like:

An example of a rich results powered by structured data
An example of a rich recipe result powered by structured data

Besides the title, the URL and the description of the search result, you can see how long it will take to make the absolute best ever lasagna. And, you’ll see how many calories the lasagne contains. You need to add structured data to your web page to get such a rich snippet.

There are all kinds of structured data. Structured data is always a code format. There’s structured data for books, for reviews, for movies, and for products in your online store, for instance. In all cases, structured data adds more details to your snippet in the search results. Browse Google’s Search Gallery to see which rich results are powered by structured data.

We have to make one side note here. Unfortunately, Google does not always create a rich snippet of your page, even if you’ve added the structured data. There are no guarantees. So all you can do is add it to your page, and hope Google will pick it up!

What do you do with structured data?

With structured data, you can “talk” to the search engines. You can tell the search engines which ingredients there are in your recipe, you can tell them how long the preparation time is, and you can tell them how many calories the dish will contain. Google will be able to grasp all that information instantly and can decide to show it in the search results.

So structured data is a tool you can use to tell Google (in a way it understands what you’re saying) detailed information about a page on your website. Google then will be able to use this information to create informative, rich search results. And audiences love these rich snippets!

What is Schema.org?

The big search engines have developed a project called Schema.org. On Schema.org you can find all the structured data markup supported by the search engines. This makes Schema.org a large collection of pieces of code.

You can use Schema.org to find the markup you need for your particular page. For instance, if you sell t-shirts on your site, you could show what colour t-shirts you sell and what sizes you offer in your snippet. You should investigate Schema.org/Product and find out the possibilities.

On Schema.org, you can copy code examples. After copying it, you’ll have to adapt the code to your specific preferences.

Schema.org is a taxonomy of code formats that the large search engines understand. You’ll find examples of what the code looks like. There are other forms of structured data as well. For instance Open Graph (used by Facebook) and Twitter cards (used by Twitter).

What is JSON-LD?

JSON-LD is one of the markups of Schema.org. It’s just a way to write code. On Schema.org, you’ll also find other markups like Microdata or RDFa. At Yoast, we’ll advise you always to use JSON-LD, because it does not break your site as easily as other markups do. You can — relatively easily — add JSON-LD to your website using Google Tag Manager. That’s not possible with the other markups.

Why is structured data important for SEO?

Structured data is important for SEO because it’ll make it easier for Google to understand what your pages and your website are about. Google needs to find out what a page is about to show it in the search results. Using structured data is like talking to Google, telling Google what your site is about. That’ll help with your rankings.

On top of that, structured data will change the way your snippet (your search results) will look like. It’ll show more information to your customer. More specific information. And this will increase the likelihood a customer will click on your results. More clicks will eventually lead to even higher rankings! We’re seeing more and more structured data powered rich results pop up, so it is important to keep an eye on this.

How to use structured data?

Using structured data sounds hard, but everyone can do it — with the proper training. You have to get the right code, you’ll have to adapt that code and you’ll need to use Google Tag Manager to put it on your site.

We already have written a lot of posts about Schema.org and JSON-LD, which will help you to understand more about this subject.

No code hero? Use a plugin!

A lot of structured data markup can also be added to your website using plugins. Our local SEO plugin, for instance, uses structured data to show the location or multiple locations of your store. You don’t have to write code to get that rich snippet, you’ll just use our plugin, fill out some details and we’ll do it for you. And there are many more plugins that’ll help you to use structured data without the need to struggle with any code!

At Yoast, we’re also working on a better, much easier way to add structured data using WordPress’ new block editor: structured data content blocks.

Read on: Structured data: the ultimate guide »

The post What is structured data? appeared first on Yoast.