views:

42

answers:

3

I need a URL to just test basic http connectivity. It needs to be consistent and:

  1. Always be up
  2. Never change drastically due to IP or user agent. (IE: 301 Location redirect/ huge difference in content... minor would be tolerable)
  3. The URL itself has a consistent content-length. (IE: it doesn't vary from by 2kb at most, ever)

A few examples, yet none match all 3 criteria:

  • One example of always up: www.google.com (yet it 301 redirects based on IP location).
  • Another good one is http://www.google.com/webhp?hl=en. but the problem there is that based on a given holiday, the content-length can really vary.
+1  A: 

Why not go to something like http://www.google.com/ncr? Then you won't be redirected

Oskar Kjellin
Looks good from here (America), but they do not redirect if you are from a non-english speaking country...?
Zombies
Try my edit! :) Always redirect to the english version of www.google.com (even in Sweden where I am)
Oskar Kjellin
@Zombies Or you could try http://www.google.se/asdasdasdasd. I geuss that would always be the same, unless google creates that page. Highly unlikely tho
Oskar Kjellin
I think I will go with www.google.com/ncr .
Zombies
@>Zombies Great, I think that my last comment is more fitting tho
Oskar Kjellin
+1  A: 

You could create your own website, at least then you will know that the content will never change and you you will know when its down?

Mark Redman
Hm, I suppose I would need to find a host with good uptime, yes then that would match all criteria quite well.
Zombies
Relying on a third party for testing purposes is a bit selfish and rude, unless you have an agreement with them. Your own site is definitely the way to go.
Mr. Shiny and New
I do not think it is rude if you only test connectivity. I think google can take it :)
Oskar Kjellin
You could also just get the content from google.com (whether it redirects or not) and look for the existence some content that will be unique to google eg "window.google" (found doing a view source)
Mark Redman
Another idea could be to check more than one site that you would expect to be up?
Mark Redman
+1  A: 

It might not be obvious; but http://example.com, http://example.net and http://example.org are actual, real sites; the might suit your needs.

Edit: I'm not sure about the specifics of their uptime stats and IP address, but I imagine these things, as well as the contents, are completely and utterly static.

Williham Totland
I like the fact they exist! and one can assume that they will never change, until they change.
Mark Redman
They don't look as if they've changed a lot in the last 10 years; no reason to think the next 10 would be different.
Williham Totland