Mobile app version of vmapp.org
Login or Join
Eichhorn148

: Tagging content for search with Google I am working on a website that will contain a lot of content and I would like to add ability to tag content, just like Stackexchange does, where each

@Eichhorn148

Posted in: #GoogleSearch #Tags

I am working on a website that will contain a lot of content and I would like to add ability to tag content, just like Stackexchange does, where each question can be tagged by maximum 5 tags.

Now, I would like to use Google to search for all pages tagged by certain tag.

I thought of enclosing each tag inside special characters like this:

tags: {mytag},{google},{tags}

and then seach for {mytag} in Google.

However, it seems Google ignores special characters.
What would be the best way to accomplish this?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Eichhorn148

1 Comments

Sorted by latest first Latest Oldest Best

 

@Angie530

There are a few ways to accomplish this, however, assuming that you are referring to a Google Custom Search Engine for your site, the simplest way would be as follows:


Maintain a page for each of your tags with a URI similar to /tagged/mytag (where mytag is a given tag - each tag should have its own page)
Allow documents which match a tag to be indexed by ID or slug under /tagged/mytag/myid or /tagged/mytag/mydocument and ensure that documents include a canonical URL
When a "tag search" option is specified, append the following to the search query string: inurl:/tagged/mytag (where mytag is whichever tag the user specifies)


You can test to see which results will display by searching site:example.com inurl:/tagged/mytag at Google (in this case, the format demonstrated should work with a default WordPress installation).

This should present users with a list of results which (a) match their query string and (b) are tagged as the user has specified.

Note: The OpenSearch specification references a "tags" element - to the best of my knowledge, however, this element is not presently supported with Google searches (though many browsers - including Google Chrome - already support some OpenSearch-powered functionality).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme