Meta-tags

Talk about HTML resources, styles etc.
Post Reply
User avatar
JimBb
Deep Thought
Posts: 1964
Joined: Sun Nov 16, 2003 8:19 pm
Location: Dilbeek, Belgium
Contact:

Meta-tags

Post by JimBb » Tue Mar 29, 2005 11:19 am

C'mon, admit, you were waiting for this, right? Meta-tags, the ultimate tool for optimizing your ranking in search engines.

For starters: stop dreaming, Meta-tags alone will not make your site rank higher, and in fact their impact on your ranking will be less and less. Content is what matters, good coding is what matters, taking care of accessibility is what matters.

But having said all that, of course you shouldn't ignore meta-tags either.

So, what are meta-tags? They are a special type of comment tags that are put in the Head-section of your page. Of each page:

Code: Select all

<html>
  <head>
    <meta name="xx" content="yy">
  </head>
  <body>
    Here comes the visible part of your page
  </body>
</html>
As you can see the format is pretty simple:
name is the name of the meta-tag, content is the content of value or so of the tag.

That means that theoretically you can give any name, and assign any value to that name. And indeed you can, if you feel like doing something like the following that's okay:

Code: Select all

<html>
  <head>
    <meta name="Purpose" content="Temporary page while the real one is being rebuilt">
  </head>
  <body>
    Here comes the visible part of your page
  </body>
</html>
This is okay since nothing or nobody will interpret these tags. Only you will notice that this is your temporary page, while editing it.

Wait a second... nothing or nobody will interpret meta-tags...? Now that's not what I said! That particular tag, and many others have no or a very specific purpose. You'll see quite a lot of the following:

Code: Select all

<meta name="GENERATOR" content="Microsoft.FrontPage">
(Or something similar)
In this case, only the FrontPage web editor will interpret that tag, and for example "know" that is has been made using Frontpage.

There are however a few tags with very specific purposes:

Code: Select all

<html>
  <head>
    <meta name="Description" content="Joe's Petshop: healthy well behaved pets at reasonable prices">
    <meta name="Keywords" content="Joe, Joe's, Joes, Petshop, pet shop, pet, shop, cat, cats, kitten, kittens, dog, pup, puppy, puppie, puppies">
  </head>
  <body>
    Here comes the visible part of your page
  </body>
</html>
Some search engines will use the "Description", some will check if the description matches the keywords and the contents of your page.
Some search engines will take your keywords into account, some won't.

Anyway, if you want to be sure that every search engine knows what to do with your page, use these tags, and use them on every page. Mind you: see each page as really separate. It makes no sense if Joe will put "cats, dogs, snakes" on every page, certainly if he has a page dedicated to cats, and the words dogs or snakes are not mentioned there.

FAQ #1: How many keywords can I put there?
A: As many as are relevant for that page, and not more than 1000 characters.
FAQ #2: How long can the description be?
A: What's the shortest description you can come up with that gets the attention of your potential visitors?

Another special tag is this one:

Code: Select all

<html>
  <head>
    <meta http-equiv="refresh" content="5;url=http://www.gostats.com">
  </head>
  <body>
    Here comes the visible part of your page
  </body>
</html>
What this does is if a visitor hits this page, he will automatically be forwarded to www.gostats.com, within 5 seconds. You can use this if your site has a new domain name, or if the layout of your site changed and you want to point people's browsers to the correct address.

And a final one:

Code: Select all

<html>
  <head>
    <meta name="robots" http-equiv="robots" content="index, follow">
  </head>
  <body>
    Here comes the visible part of your page
  </body>
</html>
This tells the "spiders" or "crawlers" or "robots"or whatever you wish to call the software that searches and indexes pages for search engines to "index" this page (=put it in the database) and "follow" all links it can find (to your other pages, to index them too).
You can use any combination of index or noindex and follow or nofollow.
<meta name="robots" http-equiv="robots" content="noindex, follow"> means "I don't want this page to be in your index, but do follow my links."
<meta name="robots" http-equiv="robots" content="index, nofollow"> means "Yes, please put this page in your database, but don't follow any links you find on it."
<meta name="robots" http-equiv="robots" content="noindex, nofollow"> means "Please completely ignore this page."


And that's about all I know about Meta-tags. By the way, if you're interested in Meta-tags, you're probably also interested in Grelmar's articles about Making your site Google-friendly

Jim

Guest

Post by Guest » Mon Apr 02, 2007 7:07 am

Hi

How do you stop spiders from seeing something in site which is private say financial data?

User avatar
rchmura
Site Admin
Posts: 2256
Joined: Sun Oct 05, 2003 9:09 pm

Post by rchmura » Tue Apr 10, 2007 3:52 pm

The best way to prevent SE spiders from seeing your content is to password protect it. But really, why would one put their private information online in the first place?

Post Reply