SEO: search-friendly URLs worth it? possible without extensive redesign?
I'm working on an extensive site containing about 1000 PHP files. In addition to search pages and account pages and so on, a great many of these files accept numeric query string parameters:
We are considering trying to alter the structure of our site to present more user-friendly URLs like this instead:
I completely understand how we might use mod_rewrite and some database work to map that URL onto http://example.com?id=1234. However, I'm wondering a couple of things and would like some input.
1) If we don't change our internal links to a page (i.e., they still point to http://example.com?id=1234) then this doesn't really help our search engine ranking unless external sites somehow know to link to the new fancy URLs, right? The perhaps futile hope is that we don't have to go change all the links in our 1000 PHP files and that we might use some mod_rewrite trickery to gain some advantage here.
2) Suppose I type http://example.com?id=1234 into my browser. Is it possible to display the search-friendly URL (http://example.com/careers/Computer_...-_Applications) in the browser instead so that if someone copies it to an email they get the long fancy URL?
2a) Is it possible to efficiently redirect a search engine looking for http://example.com?id=1234 to http://example.com/careers/Computer_...-_Applications and thereby gain all the advantages of our supposedly search-engine-friendly URL? Would we need to send an HTTP response code (301? 303?). Will the search engine be smart enough to know that the search-friendly URL is the 'real' link when it encounters the old-style link in the HTML of our site or somebody else's site? Does it help our ranking at all? What is the best technique for this?
3) I've heard that Amazon went from the query string / id approach to search-friendly URLs by using mod_rewrite type technology and ignoring the middle search-friendly part of a URL and putting the id part at the very end of the URL like this book called "Choke" by Chuck-Palahniuk.
This is what I think I should be shooting for and I understand how to accept the URL on our server and load up the right content, I do not understand how to capitalize on it to improve our search ranking. Thoughts?
4) Will this really help that much?
Any and all discussion of this is welcome and encouraged.
1) Yes, that is correct. If you don't change your internal links SEs would probably never know the long URLs. Yes and no, one part, that defaults to the 'no', is done by your app:
The second part has to be done by mod_rewrite (put this in .htaccess):
You can also do this by ErrorPage 404 but I have heard that this is much slower.
As you can see the first call has only 'id=x' set, by the second has 'cat_name=x' and 'page=y' set. So you can may do something like this in a central place of your script (lets say 'core.inc.php'?):
3) With my snippet above, no longer possible. It would result in an endless loop
4) Maybe, I'm not a SEO specialist, but I have heard too, that keeping the browser title in URL might also help. I extended my example a little, see variable $title for instance.
I hope that gives you a little idea...
I have managed to get a pretty awesome rewrite going using mod_rewrite on a testing server. It will take this url:
HOWEVER there is a problem. All the images, scripts, and links are broken in the resulting page because they are evaluated in the browser relative to the new-fangled seo-friendly page. How do you deal with this problem?
Hire Drupal Developer
You can make search-friendly URLs the following types.
2.Redirect the URL.
3..And try this code.
$link1 = "index.php?option=com_redirect";
Not a Linux Question---off to Programming
OK I have been working on this SEO thing for some time now and thank goodness I'm getting paid for it as it's really involved.
The optimization so far has required a variety of steps:
1) create rewrite rules in the .htaccess file to map the old ugly urls onto the new nice ones with a 301 redirect (permanently moved). Because the fancy new urls have information that doesn't exist in the old urls, this requires a RewriteMap directive so that I can query a database or text file mapping old info onto new ones.
2) create rewrite rules which internally map the fancy new urls onto my actual PHP files in a meaningful way.
It's a total pain.
|All times are GMT -5. The time now is 12:40 AM.|