Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

301 Redirects Based on Previous URL?

         

shaunm

7:47 am on Oct 14, 2016 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hello All,

I was just curious going through this site which performed a redirect I never knew of before. I can understand the benefit of redirecting users based on the location like Google is doing with its international properties via 302 redirects.

But this one is something completely new for me and I don't exactly know the disadvantage of such redirects even if I can presume the advantage of it; serving the city based content to meet with users intent. For example, consider the site as example.com which provides home services in selected cities. It has this generic anchor "carpet cleaning" in the footer which leads you to example.com/carpet-cleaning upon clicking but only If you come to the site from the home page or any other non-service related pages.

At the same time when I'm into the site, clicking on various location based services and click on the 'carpet cleaning' from the foot link, it actually 301 redirects me to a location based service URL. For example, example.com->example.com/edison-plumbing-services ->click on "carpet cleaning" from the footer->led to example.com/edison-carpet-cleaning via a 301 redirect from example.com/carpet-cleaning. Isn't it strange? How come the same URL is serving two different server responses based on where you were previously? It's not a JS redirect or Meta refresh.

How do such redirects works and how does Google treat such URLs because I can clearly see both example.com/carpet-cleaning and example.com/edison-carpet-cleaning in its index which is you cannot normally witness with 301 redirects.

Thanks for your help!

Walt Hartwell

3:13 am on Oct 15, 2016 (gmt 0)

10+ Year Member Top Contributors Of The Month



example.com/edison-plumbing-services ->click on "carpet cleaning" from the footer

I'll assume "edison" is included in the URL for "carpet cleaning" the footer.

Lot of people use dynamic pages rather than static.

levo

8:25 am on Oct 15, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can set a cookie once they visit a location-specific page, and redirect them when they visit a generic one.

shaunm

4:45 am on Oct 19, 2016 (gmt 0)

10+ Year Member Top Contributors Of The Month



@Walt Hartwell
Nope. As I said, it's a static URL which 301 redirects based on your location, browsing history.

@levo
I can understand the location based, cookie set pages. But in most cases, they would be 302 without affecting the primary page in question. So, I was just wondering about how Google treats the URL carpet-cleaning; as 200 or 301? Thanks!