Google sitemap files for Rails projects

Add this route towards the bottom of your config/routes.rb file (more specific routes should be listed above it): map.sitemap ‘/sitemap.xml’, :controller => ‘sitemap’ Create the SitemapController (app/controllers/sitemap_controller): class SitemapController < ApplicationController layout nil def index headers[‘Content-Type’] = ‘application/xml’ last_post = Post.last if stale?(:etag => last_post, :last_modified => last_post.updated_at.utc) respond_to do |format| format.xml { @posts = … Read more

Is it ok to remove Google TXT verification records after I’ve authorized my domain with Google? [closed]

No, you shouldn’t remove any of the verification files or DNS records. Google will periodically recheck your site and if it doesn’t succeed you will lose access to WMT, for example. See this WMT support page: Removing the record from your server can cause your site to become unverified, and you will need to go … Read more