Should there be a trailing slash in the permalink

admin2025-06-01  2

Which WordPress permalink structure is better in terms of performance and SEO:

/%post_id%/%postname%

or

/%post_id%/%postname%/

Does it matter?

Google has big discussion here. But it's not from a WordPress perspective.

Which one should I use and why?

Edit: I noticed I get an advantage using /%post_id%/%postname% since any mistake etc after sitename/123/wrong-words?some=params&etc=etc gets redirected to the correct post. But for sitename/123/correct-full-postname/someword generates a 404.

Which WordPress permalink structure is better in terms of performance and SEO:

/%post_id%/%postname%

or

/%post_id%/%postname%/

Does it matter?

Google has big discussion here. But it's not from a WordPress perspective.

Which one should I use and why?

Edit: I noticed I get an advantage using /%post_id%/%postname% since any mistake etc after sitename/123/wrong-words?some=params&etc=etc gets redirected to the correct post. But for sitename/123/correct-full-postname/someword generates a 404.

Share Improve this question edited Jul 11, 2019 at 18:49 Brooke. 3,9121 gold badge27 silver badges34 bronze badges asked Jun 7, 2015 at 12:22 Debajyoti DasDebajyoti Das 1431 silver badge11 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 3

It makes no difference performance-wise, if it did, there'd be something seriously wrong with WordPress.

The same goes for Google, if a lot of super smart people earning 100k salaries can't write software that handles a trailing slash, then something is terribly wrong with the world.

Either way, WordPress puts the rel="canonical" tag in the header so regardless of wether there's a trailing slash or not when you visit the page, Google will see that tag and see what the canonical authoritative URL for that page is.

As a side-note, Google doesn't reserve special rules for WordPress sites, they're all just sites as far as Google is concerned.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748778717a313746.html

最新回复(0)