2

I'll use the example of a dating website for my question. A member on the site has a profile that is active for a limited time, after which it expires (unless they renew their subscription). But once it expires, you shouldn't be able to see the profile if you go to the url. I was thinking of using a 301 redirect to redirect from their profile page to some kind of relevant category (e.g. a region that they're from). If they reactivated their profile (which may never happen or could happen at any point in time), it would obviously need to stop redirecting. Would my idea with the 301 redirect be the right choice?

1
  • 1
    1. The profiles are public? 2. Wouldn’t it make sense to show a message that the member’s subscription has expired (and hide the rest of the profile)?
    – unor
    May 21 '16 at 12:45
1

301 might not be the right choice as it is for permanent redirect. It should be used when a requested resource has been moved permanently to a new URL and any future references to this resource should use one of the returned URLs which is not the case.

302 (or 303) may be the better choice for redirection. You may also refer to difference between 302 and 303 here - https://serverfault.com/questions/391181/examples-of-302-vs-303

Also, you may consider 404 error for these profiles (because it doesn't indicate whether it is temporary or permanent) and show a custom 404 page with links to other profiles from the same region etc.

1
  • Just to add, regarding the "permanent" nature of a 301... this will also be cached. So if the profile was reinstated, users might still see the cached redirect instead.
    – MrWhite
    May 21 '16 at 13:03
0

You need to use a 404/410 response so that once users have closed their profiles, they can remove from search result pages if they wish. They would not be able to do this with a redirect.

2
  • 1
    410 must not be used because users could reactivate their profiles ("may never happen or could happen at any point in time").
    – unor
    May 21 '16 at 12:47
  • For the purpose of submitting a removal request, it doesnt matter what 4xx response is used, and removal requests was my whole point.
    – user29671
    May 22 '16 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.