SEO Guide For Drupal
A few tweaks and modules later, Drupal has easy to build SEO friendly websites. To achieve it, there are two sides involved:
- Developers and designers will apply technical enhancements (making a good use of the core and contributing modules, write semantic and valid HTML prototypes).
- Clients create good content.
Below are a few things you can do to improve SEO on your website just by working with content (texts, images, files).
When you create a page on a website, the page title you decide on is used in several different places so it’s important to get it right and make sure it’s clear and useful.
Page title will appear:
- On the page (usually as h1 heading)
- In the main menu
- In the url page
- On listings linking to the page (from your site and also from social media sources)
All of above are picked up by search engines, so it’s important to include relevant keywords in your titles.
Page titles should be clear and descriptive. If titles are too long to fit into a menu, or if you want to have a different menu link then the page title you could use the ‘menu link title’ field to display.
Drupal has a feature that allows you to specify a ‘menu link title’, you can find this at the bottom of the edit page form in the “menu settings” tab > “Menu link title”.
Please note, spaces in titles will be converted into dashes in the url, so do not use dashes in titles. Maybe you could replace dashes with a colon to avoid “double dashed” urls.
Meta description tag
The meta description is the excerpt that displays under the page title and site name on the search engine’s results page. If it’s not filled in, the body copy will be used instead. This may lead to a cut off excerpt, but you could manually fill the ‘meta description’, or use the ‘summary’ field to avoid it.
In Drupal, the body text field on a page is accompanied by a summary field. It is important to fill this in. Sometimes, it’s used on the site as a teaser to promote users to click the page and read the full copy. Remember, it will be picked up as the meta description for the page if no meta description was manually added.
When adding or editing content to the Body, in the WYSIWYG toolbar at the top of the text field, you’ll see a dropdown with a few headings options. Commonly, you will have a choice of heading 2, heading 3, heading 4, and normal/paragraph.
When starting a new section on a page, use one of the headings defined in the dropdown. Headings are picked up by search engines and will contribute to your search rank.
Besides helping out with SEO, headings are designed to draw the reader’s eye so that they are able to find what they were looking for much easier. They are also useful for good content structure if the copy is long.
For SEO purposes you should only have the h1 tag used once on a page. H1 is commonly the page title.
This is the text that links to something else. For example, if I would like to point you to the about us page, then the anchor text is the (commonly) blue text you see.
Search engines compare the text written in the anchor to the link “behind” it. So if they anchor text includes keywords or phrases that will add value over time.
Anchor text is read by screen readers so it plays an important role in complain with accessibility requirements.
Please make sure that your anchor text is also descriptive.
As a general rule the copy should be as long as it needs to be. Online content is not read in the same way as printed content, so keep things concise, clear and straightforward bearing in mind the user experience, not only the SEO.
As a reference, some SEO advisers recommend around 200 words as a minimum for page copy.
Files (Images, documents)
Filenames should follow the following convention to eliminate technical problems and to improve SEO.
- Use full words
- Replace spaces with dashes
- Do not use special characters, just letters, numbers and dashes.
Filenames should be also descriptive.
Some good examples are: mobomo-logo-red.jpg, partnership-agreement-2017.pdf
This is a descriptive text that appears if an image cannot be loaded and is also used by screen readers. So here SEO is directly implicated with Accessibility. It’s especially important if the image also acts as a link.
This text should clearly describe the image.
Main thing you should know about files in web: Large file sizes slow down page load.
Users tends to abandon pages if the load time is greater than 3 seconds. So search engines “don’t like” to direct users to slow sites.
So, you can help to keep the page speed to a minimum by making sure the files you add are light.
A general rule is to try to keep images filesize below 70k, this sometimes is hard especially with large images (banners for example), so let’s say images should not ever be larger than 600k.
All images should be saved in jpeg format.
Documents should be saved as pdf or doc (for editable documents).
404 and 403 pages
We are going to set up these pages for you, but it’s important that you fill them with accurate content given your audience. For example, you could add a link to your Homepage here or to an Archive / Search page to help your audience finding what they were looking for.
Please note these points listed above are changes you can apply without any tech support, they are just Content edits you can apply by yourself when adding / updating content for your website.
Here’s a few SEO related Drupal modules that makes developers lives easier.
- Cache (In Drupal core, should be activated on production sites)
- Minify resources (In Drupal core, should be activated on production sites) Both CSS and JS.
- XML Sitemap (https://www.drupal.org/project/xmlsitemap)
Generated Sitemap xml url could be shared with Google, and they will use it to crawl the website and look for updates.
- Pathauto (https://www.drupal.org/project/pathauto) Super useful module to be able to create patterns for paths on Node creation.
- Metatag (https://www.drupal.org/project/metatag). Very useful module to automate the Metatag structure based on Content Types, etc… it also very useful for Open Graph and Twitter Cards config.
- Redirect (https://www.drupal.org/project/globalredirect)
- Google Analytics (https://www.drupal.org/project/google_analytics). Integration with GA console.