GitHub

Trailing Slash

Checks for consistent trailing slash usage

Checks for consistent trailing slash usage

Rule IDurl/trailing-slash
CategoryURL Structure
ScopePer-page
Severityinfo
Weight3/10

Solution

Be consistent with trailing slashes across your site. /page and /page/ are technically different URLs. Pick one convention and stick to it. Configure your server to redirect one to the other. Most sites use trailing slashes for directories and no trailing slash for files. Use canonical tags to specify the preferred version.

Enable / Disable

Disable this rule

squirrel.toml
toml
[rules]
disable = ["url/trailing-slash"]

Disable all URL Structure rules

squirrel.toml
toml
[rules]
disable = ["url/*"]

Enable only this rule

squirrel.toml
toml
[rules]
enable = ["url/trailing-slash"]
disable = ["*"]

Type to search…

↑↓ navigate ↵ open esc close