How do i generate SEO sitemap in rails ?

What is sitemap ?

Sitemap is nothing but a .xml file containing urls available on your site

It contains URL, last modified date, frequency of content change and priority ( between 0..1 )

Why we need sitemap ?

We can submit sitemap file to search engine. It will help them in analysing what urls on your site are available for crawling.

What is xml pattern ?

<?xml version="1.0" encoding="UTF-8"?>
     <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
        <url>
           <loc>http://www.example.com/</loc>           
           <lastmod>2005-01-01</lastmod>
           <changefreq>monthly</changefreq>
           <priority>0.8</priority>
        </url>
       ...
       ...
    </urlset>
    ...

What will be the path for sitemap ?

“www.example.com/sitemap.xml”

Are we going to generate sitemap manually ?

No… there is mephisto sitemap plugin.We can use it.

script/plugin install http://svn.appelsiini.net/svn/rails/plugins/mephisto_sitemap/

Am i needed to generate to sitemap for each request ?

No ………..we can generate it in background task daily basis.

How it will be accessed for request to sitemap ?

we can define path to local file in routes.

map.connect “sitemap.xml”, :controller => :sitemap

Class SitemapController

def index

render “some local file path”

end

….

Here are the reference links

http://www.fortytwo.gr/blog/19/Generating-Sitemaps-With-Rails

http://www.bestechvideos.com/2008/07/04/ruby-plus-71-how-to-create-a-seo-sitemap-for-rails-apps

Advertisements

About sandipransing

Web Developer #ruby #rails #JS
This entry was posted in Ruby on Rails, Search, Search Engine Optimization and tagged . Bookmark the permalink.

7 Responses to How do i generate SEO sitemap in rails ?

  1. Sethupathi says:

    How to create sitemap.xml======================From the following link you can generate the site-map.xml if your application is not in https. Just by giving the application link it will generate the xml for you.http://www.xml-sitemaps.com/

  2. Link mentioned is very good !but it has limitation that we will not have any control over urls that will be submitted to search engines 🙂

  3. Elena Morgan says:

    Search engines generate nearly 90% of all Internet traffic and are responsible for 55% of all E-commerce transactions. Today, it is essential for all online businesses to make SEO an integral part of their online business strategy.So I would like to recommend one of my client who helps you define, evolve and implement a powerful SEO strategy to leverage your online business potentialhttp://www.redalkemi.com/

  4. info ternak says:

    i got lots of information from your site, thank for your sharing… 🙂

  5. […] How do i generate SEO sitemap in rails ? « Fun On Rails […]

  6. welkins says:

    how to generate xml file for cooliris portfolio in wordpress-welkins

  7. sitemapx says:

    Wow, really helpful info! An automatic sitemap generator is really needed for a newbie who wants to build a sitemap especially for a large site. But online one often has a limit for pages volume, thus, a free tool with no limits is needed such as SitemapX.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s