Mobile app version of vmapp.org
Login or Join
Rambettina238

: 301 or 302 for url that changed but new page might exist in old url I have pages for usernames. e.g. http://mydomain.com/user/<username> I'm trying to handle the case a user changes his

@Rambettina238

Posted in: #Redirects #Seo

I have pages for usernames.
e.g. mydomain.com/user/<username>
I'm trying to handle the case a user changes his username. What kind of redirect from old username url to new username url should I do? I would want a 301 to keep link juice but am concerned about what will happen when another user uses the same old username making the url live again.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Rambettina238

2 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

From an SEO standpoint, 301 redirects are almost always better than 302 redirects.

However, one difference between 301 and 302 redirects is how browsers cache them. 301 redirects are cachable whereas 302 redirects are not. Using a 301 redirect introduces this buggy senario:


User visits redirecting URL and gets sent to page A at its new location
You launch a new page B at the old URL of page A.
The user clicks on a link that should go to page B.
The user gets redirected to page A because the 301 redirect is cached by the user's browser


This chain of events seems fairly unlikely if:


The URL has been redirecting to the new home of page A for some time (weeks or months) before page B has launched (to give search engines the chance to index page A at its new location.)
All internal links to page A point to the new URL of page A
There are few external links into the old URL for page A and not many users click on them.

10% popularity Vote Up Vote Down


 

@Hamaas447

301.

It specifies that the current document has moved permanently from the old URI to the new URI. It doesn't say anything against a new document appearing against that URI one day.

Google will recrawl the page when it sees links to it, or finds it in a sitemap, and upon seeing the 200 code that it'll return when it is valid again, will index it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme