Make Drupal SEO Friendly
Drupal does have some SEO holes when used straight out of the box. In this article, I will list the major flaws and how to overcome them.
Because of the way the Drupal file system works, it is possible to access the same content with different URL's. This is particular dangerous as search engines do not like duplicate content.
Solution: Use the Robots.txt file to block search engine's from indexing secondary paths to your content. See Using Robots.txt with Drupal to avoid duplicate content for more information.
No Meta Tags
By default, Drupal does not allow you to add meta tags to pages. Description and keyword meta tags are useful in SEO if used correctly.
Solution: Install the Meta Tag module. This will allow you to add description and keyword meta tags to all of your pages.
Trouble indexing all pages
Ok, so this is not a problem confined to just Drupal system. Search engines often have trouble indexing all the pages on a website. This problem is made worse when your content is generated dynamically from a database when using a content management system like Drupal.
Solution: Install XML Sitemaps module. This will create an XML sitemap of all of your pages. You can then submit that sitemap to Google to help its crawlers index your pages. See Set up Google Sitemap in Drupal for more information.
Non descriptive URL's
By default, Drupal creates standard, non-descriptive URL's for each page. Each page is a node and the URL become http://www.yoursite.com/node/1. Some search engines (in particular MSN) like to have keywords in the URL.
Solution: Install the Pathauto module. This will automatically create meaningful URL's. You can base the URL's on factors like date, author, title, and category. I would recommend you use categories and titles. For example: http://yoursite.com/category/page title.
If you are using this module, then you are creating duplicate content. A user and search engine can access your content using node/1 or cat/page-title. So it is really important that you block search engine robots from indexing anything with node in the url. You can do this by adding this to your robots.txt file:
See Using Robots.txt with Drupal to avoid duplicate content for more information on preventing duplicate content.
When following the above guidelines, Drupal is very search engine friendly. You should enjoy a higher search engine ranking then most other content management systems.
If you liked this, you'll love my book, Master Drupal Module Development.
"..the must have drupal developers book"
Feeling stuck with Drupal 8 module dev?
Get the free 7 lesson course that will help you get started today without feeling overwhelmed.
- Create Drupal modules with just a few commands using the Drupal Console
- Create custom pages
- Create custom blocks
- Create admin forms
- Demystify routers and controllers
- Bonus material