On Monday 23 Jan 2006 04:02, Jeff P. wrote:
One problem faced by developers of active content is making sure that
the final results of their magic result in URL’s that Google and other
search engines are comfortable with. Otherwise, your content won’t ever
get spydered and indexed and ultimately returned in a google user’s
Just think of all those ugly JSP and ASP “short novel” URLs that get
no problem - Rails URLs are a work of art by comparison.
In reading the agile rails book, it seems that the URL’s are all simply
the name of a controller, with no extension to tell a spyder or search
engine what kind of content that URL will serve up – “.html”, or
“.php”, or anything else that a spyder would be comfortable with.
That’s what the MIME type is for - only really old / broken user agents
on the file extension to work out what the content is.
You could theoretically serve your pages with the extension “.doc” or
“.somerandomextensionthatimadeup”, or even no extension at all - as long
you set the MIME type correctly in the headers it will work great.
In fact, I’m sure some future RFC recommended not using file extensions
for anything (not even for images), though my Google-fu isn’t so great
this time of night that I can actually find it.
That being the case, are there ways to change how its written, or
redirection tricks, or some other way to make a dynamic rails site
deliver pages that search engines will index?
The search engines will try to access each URL as if it were the root of
directory (so you know from back in the old days of “my first website”
you go to “/” and actually you’re seeing “index.html”), and thanks to
MIME type will recognise that it’s a HTML page.
“If it ain’t broke, don’t fix it”… this is a non-problem, so don’t
about it, everything will work just fine as it is!
Rent-A-Monkey Website Development
PGP Key: http://www.rentamonkey.com/pgpkey.asc