A great content management system (CMS), over 1 million users globally have used Drupal to build powerful websites on the Internet. However, to maximize the search engine optimization (SEO) of a website built with a CMS like Drupal, you must configure the site with the proper settings. Let’s look at the basic steps you should take to optimize a fresh install of Drupal.
Optimizing Drupal for SEO
Not very SEO friendly by default, Drupal requires website owners to install a set of third-party modules to improve its search optimization. In order to optimize Drupal for SEO, you should:
- Start with Clean URLs and the Pathauto Module. These will give you the benefit of being able to control the use of keywords in each URL based on the title of the page.
- Install and Configure the Metatag Module. You will need these for advanced configurations of HTML, Open Graph, Twitter Card, and Dublin Core metatags required for social media and SERPs.
- Use Google PageSpeed to test the site. Follow the recommendations for webpage performance according to this framework to fine tune the Drupal site settings.
When installing Drupal 7, the CMS will automatically run a test to see if the server will support the use of Clean URLs. The main reason for this is to confirm that the “mod-rewrite” extension for Apache is available. Clean URLs will remove the “?q=” string that appears after the domain name on every Drupal page and also allow for further customization of URLs with keywords based on the page title using the Pathauto module. The use of keywords in the URL is considered a major factor of the Google PageRank algorithm for categorizing the content of pages of search engine result pages (SERPs).
The only difference with Drupal 8 is that Clean URLs are enabled by default in the installation process and there is no admin section to disable them. For more information on configuring a web server to use Clean URLs with Drupal 8, visit this overview page on Drupal.org. The important point with Clean URLs is that they are just the starting point for maximizing SEO performance on a Drupal site with Pathauto.
Configuring the Pathauto Module for SEO
The installation process for the Pathauto, Metatag, & AdvAgg modules is standard: download the files from Drupal.org, unpack the zip files, and upload them to the server in the sites/all/modules folder or use Drush to install them with the command line. Enable each module in the Drupal administration section and check the permissions. (Note: Metatags requires both the CTools & Token modules)
There are only a few main values to consider with Pathauto, then the module will automatically translate the page titles of Drupal content into SEO friendly URLs which are keyword rich for content searches. Navigate to the Pathauto configuration section and review the default settings, replacing any of the program variables using keywords.
Configuring the Metatag Module
When using the Metatag module with Drupal 7 and 8, the most important settings relate to the page title, canonical URL, and description. These metatags determine what summary text will display for each page in the Google SERPs or other search engines. The page description can be the same for all pages on a site or set individually for each unique page. Because pages with a unique description will perform better in the SERPs, it is important to configure the description to be based on the teaser summary.
The Metatags module will integrate with Views and also allow for the custom setting of page descriptions according to content type. Best practice is to configure the page description for the homepage and main menu landing pages manually, then use Drupal systems variables to auto-write unique values for dynamic content. Use of the Dublin Core tags is considered optional. The module also allows for custom icons and favicons to be programmed through metatags for web apps and mobile.
Drupal & Google PageSpeed Tests
Google PageSpeed is a great way to test the performance of your Drupal website and to ensure that Google is happy with your site. After all, optimizing for SEO is primarily optimizing for Google!
Some of the issues with Google PageSpeed tests relate to the server environment – for example, the response time of the DNS server and the web host. This is why it’s always important to choose a good drupal web host. InMotion Hosting comes highly recommended as a top Drupal web host on many review sites.
The main factors that Google PageSpeed tests for:
- Time of the initial page load and server response time
- Prioritization of visible content on mobile devices and web browsers
- Image compression (jpg/jpeg, png, gif)
- The use of browser caching on web pages
You should also use Riot for better image compression of .jpg and .png images, which optimizes the files for page speed much better than Photoshop when saving image files for the web. For more advanced page caching than Drupal core provides, use the Views Content Cache module, Boost, or alternatively a solution with APC, Memcache, and Varnish.
The main sections of the AdvAgg Module contain the settings for:
- Third party compression plugins
- Experimental applications
Change these settings to see which combinations work best for the website pages by visiting the Google PageSpeed test again and using a feedback process to find the optimal combination.
Summary & Recommendations
Guest Post by Jay Douglas of Howtogetonline.com