Skip to content

Add canonical-site-url setting #2706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

roberth
Copy link

@roberth roberth commented May 15, 2025

Hi 👋

This implements the suggestion by markhildreth to implement such a setting, based on the conversation in #1238.
<link rel="canonical"> plays an important role in avoiding an SEO penalty when users deploy multiple versions of their site.

I've additionally infixed -site- to highlight the relationship with the site-url, and to distinguish it from the canonical URL as it occurs in a page.

This is a more user-friendly alternative to #2415 as it's an "end to end" solution with documentation. (It may have usages beyond this use case though)

Let me know if there's anything I should improve.
When this is done, I'd like to implement a setting for opting in to clean URLs without the .html suffix so that we can close the whole issue.

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 15, 2025
@rustbot

This comment has been minimized.

@roberth roberth force-pushed the canonical-site-url branch from e421180 to 9c26fc4 Compare May 25, 2025 14:10
@rustbot

This comment has been minimized.

Based on the conversation in rust-lang#1238,
this implements the suggestion by markhildreth to implement such a setting.

I've additionally infixed `-site-` to highlight the relationship with the
`site-url`, and to distinguish it from the canonical URL as it occurs in a
page.
@roberth roberth force-pushed the canonical-site-url branch from 9c26fc4 to cbca16c Compare May 27, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants