You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support SPDX IDs with Dots in License URL Paths #219
Summary:
License URLs to use SPDX identifiers, which contain dots (e.g., /license/apache-2.0), rather than WordPress’s default approach of replacing dots with dashes (/license/apache-2-0).
Background:
WordPress by default strips dots from URL slugs to avoid conflicts, as dots typically indicate file extensions. Overriding this is technically possible (e.g., with Permalink Manager or a custom function), but it comes with caveats.
Risks/Considerations:
Dots in URLs may be interpreted by web servers, CDNs (e.g., Cloudflare), or caching layers as file extensions, potentially causing issues with content serving, caching, SEO, or site reliability.
Future WP updates may change how slugs are sanitized, introducing possible breakage.
Override would be non-standard (against WP default behavior).
Request / Next Steps:
The technical risk is understood, but SPDX IDs with dots for canonical URLs would be preferred if possible.
Plan: We can do some tests in staging first using a custom lightweight sanitize_title function to allow slugs to retain dots.
Even though the page slug converts dots to dashes automatically, the redirection plugin seems to work. Would you be able to confirm if that's the case please and if this trigger any issues you listed above?
We've done quite a bit of internal research and concluded that if the redirections work for you, we think your solution is quite good, and we can’t see any downsides so far.
Since it's a redirection, the slug of the posts keeps the dash ("-"), and hence most of the risks we mentioned above won't apply, as external queries can continue using the dash (e.g., CLI, REST, etc.).
Because of the redirect, crawlers should pick up the new URL for SEO.
There will exist mismatch info (example, on RSS feed the dash ("-") version will appear, but then the crawler should get a dot (".") because of the redirect. But it still works.
So all in all, if it works for you, we think your redirects are a good option 👍
If the redirects are working for you, we don't need to move forward with the PR we were working on. 👍
From our email conversation:
we initially started working on this to enable dots on the page slugs. That was before the comment above mentioned that the redirects could also be a viable solution for what you were looking for.
Since the redirects are working well for you, we'd recommend not adopting the changes in the PR we had started (it still needed additional testing), and keeping the dashes in the slugs. This would avoid introducing additional customization if it's not needed.
Activity
nickvidal commentedon Mar 10, 2026
@anastas10s-afk : I believe I might have fixed the dotted SPDXs for all licenses. Any dashed SPDXs will be redirected to the dotted ones as well. For example, now https://opensource.org/license/Apache-2-0 redirects to https://opensource.org/license/apache-2.0
Even though the page slug converts dots to dashes automatically, the redirection plugin seems to work. Would you be able to confirm if that's the case please and if this trigger any issues you listed above?
mjaragon commentedon Mar 25, 2026
Hey @nickvidal ,
Thank you for sharing this alternative solution.
We've done quite a bit of internal research and concluded that if the redirections work for you, we think your solution is quite good, and we can’t see any downsides so far.
So all in all, if it works for you, we think your redirects are a good option 👍
nickvidal commentedon Mar 27, 2026
Thank you @mjaragon
Also referencing a PR created by @mlaetitia: #220
mjaragon commentedon Mar 27, 2026
Thank you @nickvidal ,
If the redirects are working for you, we don't need to move forward with the PR we were working on. 👍
From our email conversation: