Metatags
Include Meta tags in the HEAD of your page.
Meta tags are HTML elements that allow you to specify metadata (information about what makes up your document) within an HTML file. There are many kinds of metadata, some of which can help search engines index your documents more accurately. Meta tags belong within the HEAD section of a document. They do not take a closing tag. You can use many meta tags within a single document.
We will only discuss a few of these meta tags here. For more information on the topic, please see the World Wide Web Consortium's notes on helping search engines index your site as well as information about the Dublin Core set of meta tags.
(View the source of this document to see how we've used them ourselves.)
Keywords and Description
You can specify keywords related to your document that may help search engines rank you within their listings. You can also specify a brief description of your document.
These tags take the following format:
<meta name="keywords" content="meta tags, HTML">
<meta name="description" content="description of meta tags">
Keep your descriptions accurate but short. Because some HTML authors have abused meta tags (e.g., by using hundreds of keywords, only some of which relate directly to their site), a few search engines ignore metatags when weighting their rankings (most notably, Excite). Please don't contribute to this problem!
Document Author
You can specify a name and email address for the person responsible for the content of the document. Regardless of whether search engines now pick up this information, it's a good idea to include it.
<meta name="Author" content="Your Name"> <link rev="made" href="mailto:you@someplace.edu">
Robot Indexing Instructions
Sometimes you may have data on your pages you do not want indexed by a search engine. One way to prevent robot "spiders" from following all the links on your page is to use the following tag:
<meta name="robots" content="noindex, nofollow">
Setting an Expiration Date
In cases where your data changes on a regular basis (or even an irregular basis), you should consider using a meta tag to tell the browser when to look for a new copy of your document. The date, expressed as a two-digit day, three-letter month, and four-digit year, represents the day on which the browser should reload a fresh copy.
<meta http-equiv="expires" content="01 Jan 2000">
Automatic Redirection to Another Document (Meta Refresh)
A special meta tag allows you to automatically redirect users to a different page of your web site. This tag is helpful in cases where an URL has changed and you need a quick way of letting people know about it.
The meta refresh tag takes the following form:
<meta http-equiv="refresh" content="0;URL=http://www.yahoo.com">
The number before the semicolon is the time measured in seconds before the browser loads the specified URL. Using "0" will cause a near-instantaneous redirect to the other page.
Since some older browsers do not recognize this tag, it's important that you also place an actual HTML link to your new file on the redirection page.
Here is an example of a forwarding document using metatags.