seo: mark login links as nofollow.
Mark links to the login page as rel="nofollow" so that search crawlers don't constantly try to crawl it. Otherwise the fact the login url is different on every page (/login?url=<current_url>) confuses crawlers. Also strip the url param from the canonical url (<link rel="canonical">) on the login page.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<menu id="main-menu" class="main">
|
||||
<% if CurrentUser.is_anonymous? %>
|
||||
<%= nav_link_to("Login", login_path(url: request.fullpath)) %>
|
||||
<%= nav_link_to("Login", login_path(url: request.fullpath), rel: "nofollow") %>
|
||||
<% else %>
|
||||
<%= nav_link_to("My Account #{unread_dmail_indicator(CurrentUser.user)}", profile_path) %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<% page_title "Login" %>
|
||||
<% meta_description "Login to #{Danbooru.config.app_name}" %>
|
||||
<% canonical_url login_url %>
|
||||
|
||||
<%= render "sessions/secondary_links" %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user