JavaScript Editor Ajax software     Free javascripts 



Main Page

For example, many dynamic web sites employ query string parameters that generate different URLs
that host very similar or identical content. This is interpreted as
duplicate content
by search engines,
and this can get the pages penalized. The use of many URL parameters may also result in
spider traps
(
http://en.wikipedia.org/wiki/Spider_trap
), or in linking structures that are hard to follow
by a search engine. Needless to say, both scenarios reduce the web site’s ranking performance with the
search engines. Duplicate content is discussed in Chapter 5.
Because the web developers reading this book are architecting dynamic sites, these subjects must be
examined in depth. And we start by categorizing URLs into two groups based on their anatomy:
?
Static URLs
?
Dynamic URLs
Static URLs
Static URLs
do
not
include a query string. By this definition, a URL referencing a PHP script
without
parameters is still static. Two examples of static URLs are as follows:
http://www.example.com/about-us.html
http://www.example.com/site-map.php
Static URLs — even those generated by a PHP script — typically pose no challenges for a search engine.
Dynamic URLs
Dynamic URLs
are those that include a query string, set off by
?
, a question mark. This string is used to
pass various parameters to a PHP script. Multiple parameters are delimited by
&
and then appended to
the query string. A typical dynamic URL looks like the following:
http://www.example.com/product.php
?category_id=1&product_id=2
In this example,
product.php
is the name of a physical file containing a PHP script on a web server.
The highlighted section is the query string. When a web browser makes a request to the PHP script with
a particular query string, the script may then present differing content based on the various parameters.
However, the script does not necessarily have to present different content based on different permuta-
tions of the query string — which is the basis of the most common cause of duplicate content. The most
trivial example of this is when you add a parameter that does not change the presented content at all,
such as in these examples:
http://www.example.com/product.php?product_id=2&extra_param=123
http://www.example.com/product.php?product_id=2&another_extra_param=456
Because the query string values affect the script’s output, a search engine typically con-
siders the same file name with differing query strings as completely different web
pages, despite the fact that those pages originate from the same physical script file.
39
Chapter 3: Provocative SE-Friendly URLs
c03.qxd:c03 10:39 39


JavaScript Editor Ajax software     Free javascripts 
R7