Hot answers tagged

11

302 redirects aren't bad for SEO as they are probably the most common redirect in use today. In fact, PHP's header() function sends the 302 HTTP response by default. Here's what Matt Cutts had to say about 302 redirects. Basically they are fine and Google will find and index those links properly. It looks like Google will show the original URL instead of or ...


11

Quantcast Measure Terms of Service (https://www.quantcast.com/terms/measure-terms-service/) Section 6: Quantcast servers may choose to occasionally respond to any publisher’s Tag by redirecting the browser to a third-party anonymous beacon to support the provision of Quantcast services in market. The decision to beacon is not related to you the publisher,...


6

This should do the trick: header("HTTP/1.0 302 Moved Temporarily"); header("Location: example.com/whatever"); header("Cache-Control: private"); header("Vary: User-Agent, Accept-Encoding"); exit; The recommendation for the Vary header is from this google developer page about optimizing caches (and problems with some IE < 9). Background on caching ...


5

I highly suspect this is cookie matching with various audience data/analytics providers and ad companies. It seems to be covered in their privacy policy, albeit fairly vaguely: We may share with third parties Non-PII, including certain Log Data, as part of providing and improving our Measure and Advertise products. For example, we may disclose such data ...


4

Googlebot may have issues using session ID cookies so you must not rely on them. You need distinct pages for each language and I recommend that you switch to foo.com/en/bar format but if you must use the querystring then add code to alter every anchor <a> tag on the page to dynamically include the language parameter based on the presence of the ...


4

It sounds like you've answered your own question. As per Google's documentation, the redirection method doesn't matter, though I must say I too would lean towards using 302 – as your colleague says, both URLs are valid and using 302 is common in other conditional redirect scenarios. However doing either without using Google's recommended Vary and rel="...


4

If it's temporary, then you should use a temporary solution! A 301 tells the search engine that the page has moved, permanently. As a result, search engines will remove your main page from the index and index the new page instead. I can't tell how long it might take for search engines to do this, but it shouldn't be a long time. On the other hand, a 302 ...


4

Reading through your questions it seems to me that you think that you only need to do one redirect. That is the case if you are moving a carbon copy of the site. If you changed things around then it gets a little trickier. What would be the best redirect to use? 301 redirect is best if you are moving your site permanently. Here is a great article about ...


3

While Will is correct that the retry-after value is optional, I'd suggest setting it anyway as a matter of practice. Setting the value has the benefit of being unambiguous. A 503 without retry-after "should be handled as a 500." If any crawler/script/etc. requesting the documents has been configured to treat 500 differently, then you can't be entirely ...


3

That kind of borders on cloaking and could get you dinged or even banned from Google. What you might think about doing is for first time users having your home page with all of the information and a big "Get Started" button and if they return use a cookie to identify they user and redirect them to http://domain.com/abcde.


3

If you are always redirecting to the SSL site, then a 301 would fit … but you might as well just change the URL you link to instead of redirecting.


3

A 303 See Other may be the most appropriate in this scenario.


3

By applying redirect from your home page to a random post, you can confuse visitors. For example and especially when visitors click on a link like www.example.com (your home page URL), they expect see your home page, not a post. Moreover, you can also confuse Googlebot and other search engines bots (and thus SEO) if the home page is always redirected to a ...


3

302 Caching A 302 response code would only be cached if accompanied with the Cache-Control or Expires headers. There is no explicit or embedded cache information within a 302 response. According to RFC 2616, section 10.3.3 302 Found The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, ...


3

The type of redirect you are using is not the problem. 301 redirects are cacheable. In fact they are extremely hard to cache bust. 301 means "permanent" and browsers are very likely to cache 301 redirects with no way with the server to undo one that is already cached. 302 redirects are generally not cached by default unless other headers indicate that ...


3

Your first two requests are the same. All clients (including curl) have to send the slash after the domain name as part of the HTTP request whether or not it is on the URL. There is no way to formulate a valid HTTP request without it. A minimal HTTP request is: GET / HTTP/1.0 host: jekyllrb.com Omitting the slash from that will result in a "400 bad ...


3

I generally advise against this. The reason is simple. There often is little to no value in actually changing domain names. Having said that, there are times where a domain name change is required. The simplest way to do this is to set-up a blanket 301 redirect from your old domain to your new domain name. In the case where a page is removed, and you want ...


3

Redirection is the process of forwarding one URL to a different URL. There are three main kinds of redirects: 301, 302, and meta refresh. Types of Redirects 301, "Moved Permanently"—recommended for SEO 302, "Found" or "Moved Temporarily" Meta Refresh A redirect is a way to send both users and search engines to a different URL from the one they originally ...


2

For more information on response codes, see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html (or http://urivalet.com/reason-phrases/ for a summary). To answer your question, and to allay the issues with the 303 response (that some clients don't understand it), you would be safer to stick with a 302.


2

If you want to redirect example.com => www.example.com (or vice versa), then use a 301. If you want to redirect the root URL to an internal path, www.example.com => www.example.com/general/index then use a 302. The internal redirection isn't necessary a bad practice. Sometimes CMS impose this redirect because the CMS package needs to be installed in ...


2

However, the change would have broken existing links. So, nicely, they stuck in 302 redirects. Well, the important bit here is that the change would have broken existing links. /commerce/product_info.php?products_id=9266 isn't the location of the product page anymore, /products/9266 is. It's not at all unreasonable to expect the old-style links to stop ...


2

Change the 302 to a 301, my guess is the temporary redirect is confusing Google and causing it to keep both page's data.


2

I don't know why the redirects aren't being detected correctly if you are certain that they were implemented correctly, but in general I have seen Webmaster Tools take awhile to drop old URLs off of various reports, so I would wait a bit to see if the problem goes away. Check the cache dates in Google search results for some of those pages; it's possible ...


2

The Retry-After header is optional. It if is specified, then it helps search engines determine when it's appropriate to crawl your site again.


2

Well, I'm going to stick my neck out and say it's impossible to determine, with a degree of accuracy, the difference between an incoming link and a redirect, or to specifically determine whether it was a redirect and not some other kind of request. As far as the target website is concerned, it receives the same HTTP request whether it is as a result of a ...


2

As precised in the Google specification, you could use 302 redirection (but not 301) when they call you with ?_escaped_fragment_= to provide them the content. The problem I could see in your implementation is that, maybe, your HTML files contains some links that are relative to the redirected page or that point directly to others HTML files. For example if ...


2

I would recommend creating a home page that describes what your site is and how to use it. Users would have to click a button like "new document" to create a text editor. This is how a similar site that I use works: http://collabedit.com/ The SEO advantages are: Search engine bots don't get 302 redirects There is content on your home page that lets you ...


2

503 everything is the best strategy I can think of, together with a retry after HTTP header. Source: http://googlewebmastercentral.blogspot.co.il/2011/01/how-to-deal-with-planned-site-downtime.html


2

I think your question is a bit confusing, probably mainly because you have some terminology mixed up. A redirect literally just means that a client tried to load a certain URL, and the server redirected them to another page. Whether or not this is the page the user intended has little to do with it from a technical standpoint. A HTTP Status code is a ...


2

If you redirect a page to another page, then Google will no longer index the redirected page. Implementing a redirect removes the content. If you are moving a site from one domain to another without changing the content, you can use the change of address feature in Google Webmaster Tools. When doing so, your new site will take the place of your old site ...



Only top voted, non community-wiki answers of a minimum length are eligible