Search Engine Optimisation (SEO) is designed to help your webpage rank higher on Google and other search engines to help drive traffic. Whilst Zendesk Guide has its own built-in search, we also need to consider other places where your users might seek your content e.g your external website. Ensuring your Help Center is displayed correctly on search engines is critical to getting your users the content they need.
We're going to help you with ways of verifying all pages have an explicit meta description, which will benefit the page's appearance within search engines (Google, Bing, etc).
This article covers the following topics:
- What is a meta description?
- What does Zendesk Guide provide?
- Host mapping - Change your help centre URL
- Optimising article content
- Add a description to Categories and Sections
- Consider custom code for pages without a meta description
What is a meta description?
A meta description is a brief summary or preview of a webpage's content that appears below the page title in search engine results. It is a snippet of text that provides a concise description of what the webpage is about, usually no more than 155-160 characters in length.
The meta description is not a ranking factor used by search engines, but it plays an important role in attracting clicks from search engine users by providing them with a clear idea of what they can expect to find on the page.
A well-written meta description can encourage users to click on your webpage in search results, which can improve your website's click-through rate and potentially lead to increased traffic.
What does Zendesk Guide provide?
Zendesk Guide will automatically create the majority of meta-description content for you, however, some of this is optional; it additionally leaves out key pages, such as the new request form and the main homepage.
One further thing to keep in mind if you are using a guide theme purchase from the Zendesk Marketplace is that the majority do not have measures in place to ensure those pages have an explicit meta description.
Default Behaviour:
Articles | Automatically Generated |
Sections and Categories | Optionally Generated (only if the description is present) |
Homepage | Not generated |
New Request Page (Contact Page) | Not generated |
Custom Pages | Not generated |
1. Host mapping - Change your Help Centre URL
To make sure your content is being indexed with your main website, we recommend setting up Host Mapping so that your Help Centre is using the same domain address as your external website.
Configuring host mapping will help to ensure that if content in your Help Center is as popular as the main pages on your website, they will likely be indexed in Google Search alongside other main pages of your website.
In the below example, one of our own help centre sections "CX Tips & Tricks" is shown alongside other pages from our main website.
For more information on setting up Host Mapping, please see this Zendesk Guide: Host mapping - Changing the URL of your help center
2. Optimising article content
The first 137 characters of your Article will be used for the Meta description. With this mind it is best practise to start each Article with either the direct answer, or a summary of the article.
A common mistake is to start an article with a manually generated index of contents within the article. Doing this first will mean those contents are used for the description - which is less than ideal.
If you are using a manually generated index, place this below your first summary statement.
3. Add a description to Categories and Sections
Categories and Sections are tools utilised in Zendesk Guide to organise your articles into appropriate topics or a heichrachy structure defined by you. When configuring Guide it is optional to enter in a description, however it is best practise to always add one as it will be used for the meta description tag, regardless of whether you're visually rendering it on the page itself.
Entering in a brief description for a category or section of what the contents are about will help the user quickly decide if they've navigated to the correct area.
4. Consider custom code for pages without a meta description
The following pages do not have a meta description set:
- Homepage
- New request page
- Any custom pages
- Many other types of pages which do not utilise Categories or Sections
Google will still be able index these pages and attach to your domain if you have host mapped your Help Center (as described previously above). However being able to exciplitly state the description does lead to a better user experience and raising your Google page ranking.
We've provided you with a code snippet below which you can use inside your Guide theme which will insert a meta description for both the Homepage and new request page.
Preparing the code snippet:
- Copy and paste the code snippet below into a new blank text file.
- Update the code in bold with your desired description.
- Save a copy of the updated code.
Code snippet installation:
- In Guide, click the Customize design icon () in the sidebar.
- Click Customize on the theme you want to edit.
- To edit theme code or assets, click Edit code.
- Navigate to the Templates folder and open the document_head.hbs file.
- Copy and paste the updated code snippet which you prepared earlier, and paste it into the document_head.hbs file after any pre-existing code.
<script>
//script for adding a meta description to
let userLocale = window.location.pathname.split('/')[2]
let currentPageType = window.location.pathname.slice(5 + userLocale.length)
//function for creating meta tag
let setMeta = (description) => {
let descriptionMeta = document.createElement('meta');
descriptionMeta.setAttribute('property', 'description');
descriptionMeta.setAttribute('content', description);
document.getElementsByTagName('head')[0].prepend(descriptionMeta);
};
let description = "";
//for the homepage
if (currentPageType == "") {
description = "ENTER YOUR HOMEPAGE DESCRIPTION HERE";
setMeta(description);
}
else if (currentPageType == "requests/new") {
description = "ENTER YOUR NEW REQUEST DESCRIPTION HERE";
setMeta(description);
};
</script>
Custom Pages:
If you're using custom pages in your Help Center, you can utilise the code snippet below to add a meta description to those pages.
Simply duplicate the last else if statement and change the description and page title (so that the code recognises the page URL):
else if (currentPageType == "/p/pagename/") {
description = "ENTER YOUR NEW REQUEST DESCRIPTION HERE"
setMeta(description)
}
</script>
Below is an example of the entire code which includes meta tags for the following:
- Homepage
- New request page
- Custom page (you'll need to update the text 'pagename' with your custom page name in order for this to work)
Entire code example:
<script>
//script for adding a meta description to
let userLocale = window.location.pathname.split('/')[2]
let currentPageType = window.location.pathname.slice(5 + userLocale.length)
//function for creating meta tag
let setMeta = (description) => {
let descriptionMeta = document.createElement('meta');
descriptionMeta.setAttribute('name', 'description');
descriptionMeta.setAttribute('content', description);
document.getElementsByTagName('head')[0].prepend(descriptionMeta);
};
let description = "";
//for the homepage
if (currentPageType == "") {
description = "ENTER YOUR HOMEPAGE DESCRIPTION HERE";
setMeta(description);
}
else if (currentPageType == "requests/new") {
description = "ENTER YOUR NEW REQUEST DESCRIPTION HERE";
setMeta(description);
}
else if (currentPageType == "/p/pagename/") {
description = "ENTER YOUR NEW REQUEST DESCRIPTION HERE";
setMeta(description);
};
</script>
Need further help?
Get in touch with our passionate experts to get further Zendesk guidance