$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Should there be a trailing slash in the permalink|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Should there be a trailing slash in the permalink

matteradmin8PV0评论

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.

Post a comment

comment list (0)

  1. No comments so far