I am trying to make my site SEO friendly, so I’m implementing rack-rewrite to get rid of 302 temporary redirects and duplicate content problems.
Running my site through ragepank.com gives me this:
2 pages returned a 200 response. This indicates potential for duplicate content problems. Ideally, only http://www.example.com OR http://example.com should return a 200 response.
http://www.example.com returns a 200 (OK) response. PR N/A
http://example.com returns a 200 (OK) response. PR N/A
I have the rack-rewrite gem in my gem file and the following code in config/application.rb
config.middleware.insert_before(Rack::Lock, Rack::Rewrite) do
r301 %r{^/(.*)/$}, '/$1'
end
Doug’s blog below helped me get there:
http://nanceskitchen.com/2010/05/19/seo-heroku-ruby-on-rails-and-removing-those-darn-trailing-slashes/
Do you guys know how I can go about getting rid of the duplicate content issue?
Thanks in advance.
Your best bet is actually the simplest. Remove it from your sitemap and/or include it as a restricted page so crawlers don’t have access to it. This is what we do when clients have duplicate content on pages they don’t want to get rid of.