| |
Web Master Tricks META Tags
![[ line ]](img/line.gif)
It is easy to overlook some of the greatest tools in our arsenal of HTML tricks. META tags can be very useful for Web developers. Design your pages to be search engine friendly. Here you will find helpful tips and resources plus a META tag generator. I will just cover some of the basics of META tags to get you started.
META tags can be used to identify the creator of the page, what HTML standards are being used, the keywords and description of the page, and the refresh parameter (which can be used to cause the page to reload itself, or to load another page). And these are just a few of the common uses! You should do research and gain a full understanding of the tags you use on your site.
Do not try to spam search engines with the various methods people present, but rather use the proper techniques to comply with the rules by designing your site correctly. There are so many bogus services out there which say they will get you better listings in search engines. These services can only be of benefit to your site IF your site contains META tags and if they are used properly on each page. Guess what? If you already have your META tags setup correctly, you do not need their service.
Designing your site to be "Search Engine Friendly"
Please note that not all search engines/directories use META tags to gather the search engine listing for your site. Search engines vary as to their rules and how they index your site and their rules are constantly changing. Perhaps some day all search engines will conform to some kind of standard.
Search engines that recognize META tags may verify that the first 200 characters within your page contains or matches your description and contains your keywords. For those search engines/directories which do not recognize META tags, your page description will be taken from the first 200 characters of your document.
Your file name should clearly identify the contents of your page. This will also help visitors and search engines to recognize the contents of your page. See File Naming for more information.
[ Basic Header | Doctype | Title | Content-Type | Description | Keywords ]
[ Base HREF | Refresh | Pragma | Link Rel|Rev | Email Author ]
[ Robots and META tags | Breaking Out Of Frames ]
[ META Tag Generator | Expires | Keyword Relevancy ] [ META Tag Testing | Position Testing ]
![[ line ]](img/line.gif)
- A BASIC HEADER WITHIN AN HTML WEB PAGE: (Click on each to learn more)
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD ">
- <HTML><head>
- <title> </title>
- <META HTTP-EQUIV="Content-Type" content=" ">
- <meta name="description" content=" ">
- <meta name="keywords" content=" ">
</head><BODY> <-- body of page --> </BODY></HTML>
- PLACEMENT OF META TAGS
- META tags should always be placed in the head of the HTML document between the actual <HEAD> tags, before the <BODY> tag.
- Just as the content of your pages differ, so should the header of each and every page! Remember that visitors will locate and enter your site from any page and therefore, each page within your site is a point of entry. Clearly identify each page according to the contents. This point also stresses the importance of proper navigation within your site. Always provide a means of at least accessing your index.htm page from every page within your site!
[ Back to Top ]
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
- This coding will vary depending on the specific standards being implemented on your site. Visit World Wide Web Consortium to find the correct coding for the standard your site is in compliance with.
- This is used by validation services when determining the standards to which you are testing your pages. Do not state a standard unless you are in compliance with the HTML coding for that standard! For instance there are sites which claim to be HTML 3.2 compliant and yet they include back ground colors within their table commands; which is not a valid tag for that standard.
[ Back to Top ]
- <META HTTP-EQUIV=Content-Type" content="text/html; charset=iso-8859-1">
- This will tell various browsers the type of document you have and the character coding your are in compliance with.
If you wanted to view a page as plain text you could use:
<META HTTP-EQUIV=Content-Type" content="text/plain; charset=iso-8859-x">
If you wanted the page to open as a 'Save As' popup window you could use:
<META HTTP-EQUIV=Content-Type" content="text/save">
Here are some of the common MIME type/subtypes:
- text/plain: Plain text, which is the default type
- text/html :HTML file (UNIX)
- text/htm :HTML file (WINDOWS NT)
- image/gif: GIF image
- image/jpeg: JPEG image
- audio/x-wav: Microsoft Windows audio format
- video/mpeg: MPEG compressed video
Click here for more information:
http://www.w3.org/
List of registered content types (MIME types)
[ Back to Top ]
- <TITLE> </TITLE> :
- Your title should not exceed 75 characters. Your title at the top of the browser windows to identify your page. Your title also becomes the name of the "bookmark" page when visitors add your site as a bookmark. Do you ever browse through your bookmarks and have no idea where they lead to? This site does not understand the importance of a page title.
Your title is what will be displayed within search engine listings. It should draw the attention of those seeking information. From there your description will provide further information regarding your contents to get them to visit your site, or not.
[ Back to Top ]
- DESCRIPTION:
- Your description tell your visitor what they will find on your web page. The size of the meta description tag should be more then 75 characters, but less under 200 characters. The actual size used is not as important as the message it conveys, but do not exceed the limit.
- <meta name="description" content=" ">
- Make sure that you use several of your keywords in your description. While you are at it, you may want to include the same description enclosed in comment tags, just for the spiders that do not look at META tags. To do that, just use the regular comment tags, like this:
- <!--// Your description would go here //--!>
[ Back to Top ]
- KEYWORDS:
- Search engines use keywords to determine under what queries your website will come up under.
- You have a better chance of being higher up on the search engines using a narrow set of keywords than you do with a broad set. When possible, custom tailor your tags to each individual page within your website. Don't settle for a single set of tags if you can get away with custom tags on a page by page basis.
- <meta name="keywords" content="keyword1, keyword2, keyword3">
- Including commas between your keywords does have the effect of making the tag that much more readable. If you are trying to get more keywords in and stay within the character limits you may omit the commas.
[ Back to Top ]
- PRAGMA
- If you have ever had readers tell you that they are seeing an old version of your page when you know that you have updated it, you may want to make sure that their browser isn't caching the Web pages. If your page is still cached on another's computer, it will pull up that copy of the page rather then any changes you may have made since.
- Pragma provides a method in which you can control browser caching. To use this tag, the value must be "no-cache". When this is included in a document, it prevents Netscape Navigator from caching a page locally.
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- Users have reported that Microsoft's Internet Explorer refuses to use the above META tag instruction, and caches the files anyway.
It has come to my attention that the following will prevent caching your pages within MSIE: <META HTTP-EQUIV="Cache-control" CONTENT="no-cache">
Please read: HOWTO: Prevent Caching in Internet Explorer for more information. The information in this article applies to: Microsoft Internet Explorer (Programming) versions 4.0, 4.01, 4.01 SP1, 4.01 SP2, 5, 5.5
[ Back to Top ]
- REFRESH
- This tag specifies the time in seconds before the Web browser reloads the document automatically. Alternatively, it can specify
a different URL for the browser to load.
- <META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://www.newurl.com">
- Be sure to remember to place quotation marks around the entire CONTENT attribute's value, or the page will not reload at all.
Please note that refresh is considered spam by such search engines as Alta Vista and Infoseek. If you move a page and use the refresh to direct you visitors to your new page, mark this page as "NOINDEX" and include it within your robot.txt file.
[ Back to Top ]
- EXPIRES
- This tells the browser the date and time when the document will be considered "expired." If a user is using Netscape Navigator, a request for a document whose time has "expired" will initiate a new network request for the document. An illegal Expires date such as "0" is interpreted by the browser as "immediately." Dates must be in the RFC850 format, (GMT format):
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 2000 08:21:57 GMT">
[ Back to Top ]
- BREAKING OUT OF FRAMES
- Although there are many suggestions as to methods of breaking out of frames, most require the use of javascripts which do not work with all browsers. Others I have found do not conform to HTML 3.2 standards when validating your document. I have found that by using a META tag you are still able to conform to standards and have your pages break out of frames using this tag:
- <META HTTP-EQUIV="Window-target" CONTENT="_top">
- Users have reported that MS Internet Explorer refuses the META tag instructions so therefore may not recognize this command.
[ Back to Top ]
- <LINK REL|REV HREF="some URL">
- LINK is used to indicate relationships between documents. There are two possible relationships:
- REL - Specifies the relationships described by the link.
- REV - Specifies the reverse of a link relationship. In other words, the other document has the indicated relationship with this one.
- Other possible values:
- REV="made" - Indicates the creator of the document. Usually the URL is a mailto: URL with the creator's e-mail address.
- REL="stylesheet" - indicates the location of the appropriate style sheet for the current document.
- Mail the Author
- Many browsers support a "mail the author" feature, enabled by placing following in the <HEAD> element of your page.
- <LINK REV="made" HREF="mailto:your@email.address">
- I'm leary of using any commands which supply an email address due to the ever increasing amount of unsolicited commercial email generated from supplying your email within your site. Spam robots extract email addresses from the headers and the body of your pages. So keep this in mind and use at your own risk. The volume of spam i receive has decreased since removing my email from the headers of my pages, and supplying this information on a contact page which is scripted to not be indexed.
[ Back to Top ]
- <BASE HREF="absolute URL">
- Using BASE is only necessary when the URL used to retrieve the document is not the correct one. For example, a document may be mirrored on another site, or a document may be accessible via more than one URL. In such a case, this tag can be used to indicate the correct URL. The value for the HREF attribute should be an absolute NOT a Relative URL.
[ Back to Top ]
- META TAG TESTING:
This and other resources can now be located within our: [ Webmagic Resource Links ] database under "Web Design Resources".
[ Back to Top ]
- WHAT IS KEYWORD RELEVANCY?:
- Keyword Relevancy is a comparison made by Meta Medic between your keywords meta tag and the visible contents of your page. There are five possible grades you can obtain, below is a list of the possible values you can see and the meanings of each.
- Very Poor - nearly all of your keywords were not found in the body of the document.
- Poor - most of your keywords were not found in the body of the document.
- Average - some of your keywords were found in the body of the document.
- Good - a lot of your keywords were found in the body of the document.
- Very Good - nearly all of your keywords were found in the body of your document.
[ Back to Top ]
- POSITION CHECKING SERVICES:
This and other resources can now be located within our: [ Webmagic Resource Links ] database under "Web Design Resources".
[ Back to Top ]
- ROBOTS AND THE META ELEMENT:
- The META element allows HTML authors to tell visiting robots whether a document may be indexed, or used to harvest more links. The list of terms in the content is ALL, INDEX, NOFOLLOW, FOLLOW, NOINDEX. The name and the content attribute values are case-insensitive. The default for the robot attribute is "all".
- "ALL" would tell he spider to index All pages. (Be careful with this as you may have pages you don't want indexed.)
- "NONE" would tell the spider not to index any files, and not to follow the hyperlinks on the page to other pages.
- "INDEX" indicates that this page may be indexed by the spider.
- "NOINDEX" would tell the spider not to index this page, but would allow it to follow subsidiary links and index those pages.
- "FOLLOW" would mean that the spider is free to follow the links from this page to other pages.
- "NOFOLLOW" would allow the page itself to be indexed, but the links could not be followed.
- In the following example a robot should neither index this document, nor analyze it for links.
- <META name="ROBOTS" content="NOINDEX, NOFOLLOW">
[ Back to Top ]
- ROBOTS.TXT FILE
-
The robots.txt file is used to exclude robots from a server is to create a file on the server which specifies an access policy for robots.
This file must be accessible via HTTP on the local URL "/robots.txt". The file allows robots to access the instructions you set in single document retrieval.
If you are able to access your STATS file then you will be able to find out what spiders are being used to read your files. You may also find spiders for e-mail spammers. You can control the access to your site or individual files using the robots.txt file. My spam mail has cut down in volume since adding my email address to only my contact page and including this file in the robots.txt file to disallow access.
- User-agent: * # directed to all spiders, not just Scooter
- Disallow: /help/ # disallow help/index.htm but allow other files within the directory
- Disallow: /private #nothing in this directory should be indexed
- The '#' character is used to indicate that preceding space (if any) and the remainder of the line up to the line termination is ignored.
The record starts with one or more User-agent lines, followed by one or more Disallow lines, as detailed below.
Unrecognized headers are ignored.
- User-agent
- The value of this field is the name of the robot the record is describing access policy for. If more than one User-agent field is present the record describes an identical access policy for more than one robot. At least one field needs to be present per record.
If the value is '*', the record describes the default access any robot that has not matched any of the other records. It is not allowed to have multiple such records in the robots.txt file.
- Disallow
- The value of this field specifies a partial URL that is not to be visited. This can be a full path, or a partial path; any URL that starts with this value will not be retrieved. Any empty value, indicates that all URLs can be retrieved. At least one Disallow field needs to be present in a record. For example:
- Disallow: /help - disallows both /help.html & /help/index.html
- Disallow: /help/ - would disallow /help/index.html but allow /help.html.
- This example indicates that no robots should visit this site further:
- # go away
- User-agent: *
- Disallow: /
![[ line ]](img/line.gif)
[ Back to Top | Home ]
Copy & Copyright (c) 1998 - 2006 Creative Computing
Please Click To Visit Our Friends At:
|