Wrangling meta tags in Drupal site to control description in Google search results
If you've ever been confused by where Google derives the text for search results pages, you're not alone. I was surprised today to find my description in Google had recently changed.
The text "Offers web application development, content management..." is nowhere on my site.
Google uses a few different sources for the description snippets in search results:
- The text on your site,
- the description meta tag,
- or "other publicly available information".
Since I'm not using the description meta tag, and the text isn't on my site, Google must be getting that text from the third source. OK, where did it come from? Time to Google the exact phrase:
Ah ha. So it's dmoz.org, the Open Directory Project. The ODP claims to be "...the largest, most comprehensive human-edited directory of the Web." In my opinion, the project is largely irrelevant now, and because of that, we often neglect our listing there. But, as we've seen, those listings do creep into unwanted places. (Besides search results, there are still lots of "web directories" that get their listings directly from the ODP. In fact, when I searched for that exact phrase above, dmoz.org was 4th in the results page. There were 3 other listings, which got their text from the ODP, above it.)
Once you have Nodewords installed, go to the "Meta Tags" settings page. First, enable the Robots tag to output in HTML:
Next, turn on NOODP and NOYDIR:
Note that you'll need to do that in a few different spots: in the main settings page (this controls output on "lists" (pages that use pagers)). You'll also want to turn them on in the "Default Values" and "Front Page" settings.
Here's what that places in our <head> tag:
"noodp" tells search engines not to use the site title and description from the ODP. "noydir" tells them not to use data found in the Yahoo directory.
By the way, it's a good idea to go back and update your ODP listing, nonetheless:
Now, I need to wait for Google to update its listings. To speed up the process, I made sure that my sitemap.xml "modification dates" had been udpated today, and I re-submitted the sitemap to Google via Webmaster Tools. Hopefully this won't take too long.
A week later, here is my updated description: