Каква е разликата между Pinging със и без http: //?

Съдържание:

Каква е разликата между Pinging със и без http: //?
Каква е разликата между Pinging със и без http: //?

Видео: Каква е разликата между Pinging със и без http: //?

Видео: Каква е разликата между Pinging със и без http: //?
Видео: Dolly 2.0 : Free ChatGPT-like Model for Commercial Use - How To Install And Use Locally On Your PC - YouTube 2024, Може
Anonim
Ако експериментирате и научите за пинг на даден уебсайт, може да бъдете изненадани от резултатите, базирани на "какво" пинг. Днешната публикация "SuperUser Q &A" помага да се изяснят нещата за объркан и разочарован читател.
Ако експериментирате и научите за пинг на даден уебсайт, може да бъдете изненадани от резултатите, базирани на "какво" пинг. Днешната публикация "SuperUser Q &A" помага да се изяснят нещата за объркан и разочарован читател.

Днешната сесия за въпроси и отговори ни идва с любезното съдействие на SuperUser - подразделение на Stack Exchange - обединяване на уеб сайтове с въпроси и отговори.

Снимката е предоставена с любезното съдействие на Cristianzambrano (Wikimedia Commons).

Въпроса

Четецът на SuperUser Saransh Singh иска да разбере каква е разликата между pinging и без https:// е:

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.

Каква е разликата между пинг с и без https://?

Отговорът

Доставчикът на SuperUser DavidPostill има отговора за нас:

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.

Не забравяйте да прочетете другите полезни отговори чрез линка за нишка, споделен по-долу!

Имате ли нещо, което да добавите към обяснението? Звучи в коментарите. Искате ли да прочетете повече отговори от други потребители на Stack Exchange? Вижте цялата тема на дискусията тук.

Препоръчано: