If the ideal URL could speak, its speech would resemble the communication of an
experienced salesman. It would grab your attention with relevant keywords and a call to action,
and it would persuasively argue that you should choose it instead of the other one. Other URLs
on the page would pale in comparison.
URLs are more visible than many realize, and are a contributing factor in CTR. They are often
cited directly in copy, and they occupy approximately 20% of the real estate in a given search
engine result page. Apart from “looking enticing” to humans, URLs must be friendly to search
engines. URLs function as the “addresses” of all content in a web site. If confused by them, a
search engine spider may not reach some of your content in the first place. This would clearly
reduce search engine friendliness.
Creating search engine friendly URLs becomes challenging and requires more forethought when
developing a dynamic web site. A dynamic web site with poorly architected URLs presents numer-
ous problems for a search engine. On the other hand, search engine friendly URLs containing rele-
vant keywords may both increase search engine rankings, as well as prompt a user to click them.
This chapter discusses how well-crafted URLs can make the difference between highly ranked web
pages and pages at the bottom of the search results. It then illustrates how to generate optimized
URLs for dynamic web sites using the Apache mod_rewrite module in coordination with applica-
tion code written in PHP. Lastly, this chapter considers some common caveats — and addresses how
to avoid them.
By the end of this chapter you will acquire the skills that will enable you to employ search engine
friendly URLs in a dynamic PHP-based web site. More specifically, in the rest of this chapter you will:
Understand the differences between static URLs and dynamic URLs.
Understand the benefits of URL rewriting.
c03.qxd:c03 10:39 37