When creating a short url, is 302 temporarily redirected to the best way?

When creating a short URL service for URLs in the same domain, should you use 302 redirection?

Full URL structure: example.com/gig/{id}/gig-full-name-slug
Short URL structure: example.com/g/{base64id}

We use asp.net mvc3 if there are shortcuts.

+7
source share
2 answers

It’s best to return 301 so that search engines pick it up as the correct redirect and don’t try to index short URLs. This is what others do (i.e. Bit .ly)

+7
source

Since this is not a temporary redirect (since the content will never return to this URL), an HTTP 303 See Other redirect is more appropriate.

+3
source

All Articles