Add rel=canonical URL to default RedirectResource template
See https://support.google.com/webmasters/answer/139066
This commit is contained in:
parent
f2f82a4ff9
commit
2875dbec2a
|
@ -8,6 +8,7 @@ Feature: Meta redirects
|
||||||
"""
|
"""
|
||||||
And the Server is running at "large-build-app"
|
And the Server is running at "large-build-app"
|
||||||
When I go to "/hello.html"
|
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"'
|
Then I should see '<meta http-equiv=refresh content="0; url=world.html"'
|
||||||
|
|
||||||
Scenario: Redirect to external site
|
Scenario: Redirect to external site
|
||||||
|
|
|
@ -88,6 +88,7 @@ module Middleman
|
||||||
<<-END
|
<<-END
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<link rel="canonical" href="#{url}" />
|
||||||
<meta http-equiv=refresh content="0; url=#{url}" />
|
<meta http-equiv=refresh content="0; url=#{url}" />
|
||||||
<meta name="robots" content="noindex,follow" />
|
<meta name="robots" content="noindex,follow" />
|
||||||
<meta http-equiv="cache-control" content="no-cache" />
|
<meta http-equiv="cache-control" content="no-cache" />
|
||||||
|
|
Loading…
Reference in a new issue