Add rel=canonical URL to default RedirectResource template

See https://support.google.com/webmasters/answer/139066
This commit is contained in:
Ryan McGeary 2015-05-24 14:36:44 -06:00
parent f2f82a4ff9
commit 2875dbec2a
2 changed files with 2 additions and 0 deletions

View file

@ -8,6 +8,7 @@ Feature: Meta redirects
"""
And the Server is running at "large-build-app"
When I go to "/hello.html"
Then I should see '<link rel="canonical" href="world.html"'
Then I should see '<meta http-equiv=refresh content="0; url=world.html"'
Scenario: Redirect to external site

View file

@ -88,6 +88,7 @@ module Middleman
<<-END
<html>
<head>
<link rel="canonical" href="#{url}" />
<meta http-equiv=refresh content="0; url=#{url}" />
<meta name="robots" content="noindex,follow" />
<meta http-equiv="cache-control" content="no-cache" />