Front Page

Life | The Universe | Everything | Advanced Search
 
Front PageReadTalkContributeHelp!FeedbackWho is Online

or register to join or start a new conversation.

 
3. Everything / Maths, Science & Technology / Computers / The Internet

Geolocation Code in Webpages

A person uses a personal digital assistant to find their way to Manchester's G-Mex arena.

Geolocation is short for 'geographic location' and is the name given to the act of finding the actual location of a webpage. This can be done either by looking at the IP address1, by looking for company addresses on websites or by the user adding the information of their whereabouts to the code in their webpage. The last option is the easiest and most accurate and can be used to search the Internet for pages in a certain area. This makes it easy to find nearby bars, restaurants and shops by geographically locating their websites.

How Does It Work?

All webpages are written in the same computer code, known as HTML2. This code is transformed by your Web browser into the webpages you see, but is also read by search engines when they search the web for the most appropriate sites. This has led to the introduction of lines of code that aren't displayed by your browser but are read by search engines. Geolocation makes use of this fact.

The location of a webpage is stored at the top of the HTML code and is based upon the decimal notation of international latitude and longitude - the lines you see on a globe. For example, if a website was run by 'The Red Lion' public house in Brompton at latitude 57.474420 and longitude -0.070317, then the HTML geolocation code could be:

<meta name="DC.title" content="The Red Lion"/>
<meta name="geo.position" content="57.474420,-0.070317"/>
<meta name="geo.placename" content="Brompton"/>
<meta name="geo.country" content="GB"/>

A location-based search engine such as a2b reads this part of the code when searching the Web so that the engine can then display a list of the closest places to the location you entered. This is especially handy if you combine portable Internet access with a GPS receiver, as you can find out where you are and then use the Internet to discover the locations of nearby shops and attractions. In short, the main concept of the system is:

  • You own a business, which has its own website.
  • You add the code so that your website is geolocated to where you really are.
  • Someone nearby uses a search engine to find the nearest websites to where they are.
  • They are informed that you are nearby, and so they wander over to your business and provide you with custom.

How To Add Geolocation Code To Your Website

Firstly, you need to determine your website's location. You can either use a GPS device, or alternatively you could look up the location of your site using Multimap or Streetmap, making sure in either case that you note the international location3. If the website is personal, you may want to give the location of a nearby landmark instead of the location of your home.

Assuming you know HTML already, the next step is to add the following code to your website in the <HEAD> section:

<meta name="DC.title" content="the name of your website"/>
<meta name="geo.position" content="latitude,longitude,elevation"/>
<meta name="geo.placename" content="the name of your area"/>
<meta name="geo.country" content="ISO 3166 country code"/>

Although you only really need to give the latitude and longitude of your page, the above code allows you to give your elevation, the name of the place where you are and the country in which you are situated4. See the example at the start of the entry if you have problems understanding the code.

Other Types of Geolocation Code

Although the above code system may seem more than sufficient, there is another type of code known as the NAC system. The system uses a different code: <meta name="NAC" content="GZTF7 RK39Q">, and in order to find out the code for your website you must contact the company which runs the system. You may have to pay for its use. Although this may seem like a strange idea, it is supported by Microsoft and so may end up being made the dominant type of geolocation code.


1 A number used to identify a particular computer on a network or the Internet.
2 Hypertext Markup Language — to see some, click on the 'View' menu of your browser and then click 'Source' or 'Page Source'.
3 In other words, the latitude and longitude.
4 This is in the form of a two-letter code: for the United Kingdom this is either 'GB' or 'UK'.

Discuss this Entry  People have been talking about this Guide Entry. Here are the most recent Conversations:

geoPlugin: A free geolocation web service with currency converter
(Last Posting: Jul 1, 2011)

Geolocation Resources
(Last Posting: Jun 29, 2007)




Add your Opinion!

There are tens of thousands of h2g2 Guide Entries, written by our Researchers. If you want to be able to add your own opinions to the Guide, simply become a member as an h2g2 Researcher. Tell me More!

 
Entry Data
Entry ID: A7078827 (Edited)

Written and Researched by:
Back_Ache
Tufty

Edited by:
echomikeromeo


Date: 10   January   2006


Text only
Like this page?
Send it to a friend


Referenced Guide Entries
The Internet - an Introduction
Longitude
Global Positioning System (GPS)
HTML Tags
A Guide to Using Search Engines
The World Wide Web - an Introduction
Latitude


Related Pages
BBC News Technology


Referenced Sites
a2b Location-Based Search Engine
Multimap
Streetmap
Two-Character Country Codes
HTML Geo-encodings
Geo Tags Website

Please note that Not Panicking Ltd is not responsible for the content of any external sites listed.

 


Front PageReadTalkContributeHelp!FeedbackWho is Online

Please note that Not Panicking Ltd is not responsible for the content of any external sites listed. The content on h2g2 is created by h2g2's Researchers, who are members of the public. Unlike Edited Guide Entries, the content on this page has not necessarily been checked by a h2g2 editor. In the event that you consider anything on this page to be in breach of the site's House Rules, please click here .


About | Help | Terms of Use