Aký je rozdiel medzi pingom a bez http: //?

Obsah:

Aký je rozdiel medzi pingom a bez http: //?
Aký je rozdiel medzi pingom a bez http: //?

Video: Aký je rozdiel medzi pingom a bez http: //?

Video: Aký je rozdiel medzi pingom a bez http: //?
Video: Word - Tabulátory - Ako vo Worde vytvoriť a používať zarážky tabulátora - YouTube 2024, Smieť
Anonim
Ak experimentujete a učíte sa o pingingu na webových stránkach, môžete byť prekvapení výsledkami založenými na tom, čo ste ping. Dnešný príspevok SuperUser Q & A pomáha vymazať veci pre zmätenú a frustrovanú čitateľku.
Ak experimentujete a učíte sa o pingingu na webových stránkach, môžete byť prekvapení výsledkami založenými na tom, čo ste ping. Dnešný príspevok SuperUser Q & A pomáha vymazať veci pre zmätenú a frustrovanú čitateľku.

Dnešná relácia otázok a odpovedí sa k nám pridelí zdvorilosťou SuperUser - podskupiny Stack Exchange, skupín webových stránok týkajúcich sa otázok a odpovedí.

Snímka s ukážkou aplikácie Cristianzambrano (Wikimedia Commons).

Otázka

Čítačka SuperUser Saransh Singh chce vedieť, aký je rozdiel medzi pingom a bez https:// je:

I am trying to ping my website https://www.example.com/ and it resolves to an unknown IP address, then it times out.

Image
Image

But when I ping example.com, it works. What am I missing or not understanding here?

Note: example.com was substituted for the actual website at SuperUser.

Aký je rozdiel medzi pinging s a bez https://?

Odpoveď

Dodávateľ služby SuperUser DavidPostill má za nás odpoveď:

The argument to ping is a host name (or an IP address). So the following will all work:

Image
Image

On the other hand, this will not work as https://www.example.com/ is an HTTP Uniform Resource Locator (URL), not a valid host name (although part of it is a host name).

A HTTP URL is made up of 4 parts:
A HTTP URL is made up of 4 parts:
  • Scheme - Always present
  • Host Name - Always present
  • Path or Stem - Always present but sometimes is null
  • Parameters - Optional

A ping will not normally recognize URLs as a valid destination host name.

Note

Not all URLs have the format mentioned above. A complete URL consists of a naming scheme specifier followed by a string whose format is a function of the naming scheme. The format of URLs is defined in the IETF specification Uniform Resource Locators (URLs). *This is a different website address from the one shown for URL above.

DNS Hijacking

An exception to the above can happen if the DNS server (which resolves host names to IP addresses) is configured to return a valid IP address even if an invalid host name is supplied. This can happen if an ISP is hijacking your DNS queries.

From the answer Why is ping resolving to an IP 198.105.254.228 for any random host name that i type? by Michael Hampton:

They are trying to be “helpful” by redirecting requests for nonexistent domains to a white label service that provides search results and advertising, from which everyone but you gets a cut of the revenue. Fortunately, they do have a preferences page where you can supposedly turn it off.

Nezabudnite si prečítať ďalšie užitočné odpovede prostredníctvom odkazu nite zdieľaného nižšie!

Máte niečo doplniť vysvetlenie? Znížte komentáre. Chcete si prečítať viac odpovedí od iných používateľov technológie Stack Exchange? Pozrite sa na celý diskusný príspevok tu.

Odporúča: