Puzzled at HTTP/2 301 response header

It might be that WordPress is just redirecting to the version with trailing slash.

  • /cart => /cart/
  • /shop => /shop/

I’m having trouble, finding a good canonical source why WP is doing this. The fact is, that most web frameworks (I worked with) will force trailing slashes on their routes (that are not directed at files).

If you want to read more: there is this blog post on trailing slashes and URIs in general, and this StackOverflow thread has some good points as well.