Forum: Ruby on Rails Can Google (et. al.) see rails pages?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8dad1ec4d769734583f45fbbee5cd009?d=identicon&s=25 Jeff Pritchard (jeffpritchard)
on 2006-01-23 05:02
Hi,
Noob here.

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
results pages.

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 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?

thanks,
jp
8c7a98649cdbbdf39eeed17ca9bdbbd3?d=identicon&s=25 Josh Charles (Guest)
on 2006-01-23 05:07
(Received via mailing list)
On 1/22/06, Jeff Pritchard <jp@jeffpritchard.com> wrote:
> Hi,
> Noob here.
>
> 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
> results pages.

Google doesn't have a problem indexing rails sites, but I"m unsure
about the other engines.  If you're really worried about it, I think
you could to same magic in your routes.rb files to get .html
extensions.  Not sure about that - I've never tried it.
Cf7e5e4b5ca573eec214191fac420a2f?d=identicon&s=25 Dave Silvester (Guest)
on 2006-01-23 05:29
(Received via mailing list)
On Monday 23 Jan 2006 04:02, Jeff Pritchard 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
> results pages.

Just think of all those ugly JSP and ASP "short novel" URLs that get
indexed
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
depend
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
as
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
at all
for anything (not even for images), though my Google-fu isn't so great
at
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
a
directory (so you know from back in the old days of "my first website"
when
you go to "/" and actually you're seeing "index.html"), and thanks to
the
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
worry
about it, everything will work just fine as it is!  :-)

Cheers,

~Dave

--

Dave Silvester
Rent-A-Monkey Website Development
http://www.rentamonkey.com/

PGP Key: http://www.rentamonkey.com/pgpkey.asc
8dad1ec4d769734583f45fbbee5cd009?d=identicon&s=25 Jeff Pritchard (jeffpritchard)
on 2006-01-23 05:46
Dave Silvester wrote:
>
> "If it ain't broke, don't fix it"... this is a non-problem, so don't
> worry
> about it, everything will work just fine as it is!  :-)
>
> Cheers,
>
> ~Dave


Cool.  It's an interesting thing about technology.  None of what you
learn has a "freshness date" on it.  There's no way to know if you're
really smart because you've been learning this stuff for a long time, or
really stupid because most of what you know ceased to be true yesterday
(or in this case maybe a couple years ago).

thanks,
jp
This topic is locked and can not be replied to.