How does URL work? [closed] - url

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have an URL that point to a specific page http://stackoverflow.com/questions/123. Assume that stackoverflow.com is 123.12.12.12. How does DNS map a specific URL to the specific page after identifying the IP?

It doesn't. DNS just tells you what IP address to connect to. It's the web server's job to map the URL to the page.

DNS does not map URLs to pages, it is used strictly to look up host/domain names. URLs map to pages through the routing integrated into the web server.
For example, the client computer has a URL and looks up the host name part in DNS, which returns the IP. The computer then connects to the IP on the protocol-specific port and sends the HTTP request over that connection. The server then internally processes the URL from the HTTP request and returns the appropriate content.

The specific resource to access is given in the HTTP (in case of HTTP) request once you know the ip of the server.
Using the case in your example, a GET request would be something like this:
GET /questions/123 HTTP/1.1 <- Here you have the specific resource
Host: stackoverflow.com <- Here you have the host
And the DNS transform the host stackoverflow.com to 123.12.12.12

Related

Does aws "network load balancer" has an http/https addess? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'm trying to call my AWS Load balancer which is of type Network Load Balancer with http using its A address. Does AWS Nework Load Balancer support http call, I mean if I call it using http://network-load-balancer-A-name/path, will it forward the request to associated targets.
The AWS Network Load balancer operates at Layer 4 of the OSI stack, it does not know what Http is as that is something at the Application layer or layer 7 of the OSI stack.
If the listener of the AWS Network Load Balancer is configured to listen on Port 80 and is configured to forward traffic from port 80 to the target then yes, setting up a A record with an Alias in Amazon Route53 will forward to the Network Load Balancer then on to the targets. Without the Alias setting in Route53 or using something else and not Route53 would require the IP address of the Load Balancer.

http request takes time if i use domain name instead of ip address [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am sending an HTTP GET request in postman.
the first request is using IP address i.e.
get 52.66.166.14
which takes around 70ms to complete.
The second request is using domain name, i.e.
get dev.iotrek.in
which takes around 450ms to complete.
What is the reason fo this to occur? this delay that I am getting in apis.
My server is running nginx-passenger.
My backend is ruby on rails.
That difference probably amounts to your latency to the DNS server.
For example here is a request with my ISP DNS:
$ curl --silent --output /dev/null example.com -w %{time_connect}:%{time_starttransfer}:%{time_total}
0.142:0.252:0.252
Here is a request with a DNS from another continent:
$ curl --silent --output /dev/null example.com -w %{time_connect}:%{time_starttransfer}:%{time_total}
0.414:0.525:0.525
Notice the time_connect is quite different. Consider using a DNS, that is geographically more suitable for you.

Any one Know ?? how to get router ip address from mac and iPhone? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
i wanna get router ip address,i got code for how to get ip address but i didn't get router ip address(Ex: 20.30.40.01 like that).any one know please ping me..
Follow the below steps:-
1)Go to Settings
2)Network
3)Advanced
4)Select TCP/IP tab
You will get IP address of MAC.
If you want the external address:
curl -4 ifconfig.co
curl -6 ifconfig.co
If you want the internal address:
Check if your code also returns the gateway, that's the routers internal address
Your local network router is always at 192.168.1.1 it plays the role of "machine 1" on the local network, or the last 1 in 192.168.1."1"
In the event this is not typically default, and to program it into your application I would refer to the code in this posting: (How can I determine the default gateway on iPhone?)
open up terminal, type:
scutil
list (Lists all your settings)
show State:/Network/Global/DNS
Terminal should read "192.168.1.1" or other primary connection(router ip)
Should be able to script that and include it into your apps. :)
Happy Coding Ahead!

How can I get thin (the webserver) to be accessible outside of my home network? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I followed the simple instructions for installing the "thin" web server in my ruby application via: http://code.macournoyer.com/thin/
I can see that it is being called when I "start" it. However, while I am able to access the web server using "localhost". I would like to be able to access it using my ip address, or some other way - so that I can send a colleague that's not on my home network to my test app.
while I have fiddled around with some variables (port, host, etc) I am still missing something.
How can I access my thin server from outside of my home network?
Note: I do not have a firewall enabled. - Any thoughts on how to resolve this?
This is more of a network issue than a server setting issue.
You would probably need to set your router to redirect incoming accesses to your computer, how to do will vary from router to router.
In most cases there should be a menu in the router that lets you specify a port, and what internal IP address you want the request to be routed to, set that to your machines LAN IP address, and it should be good to go.
You will probably get a better answer at Server Fault or Super User.

Secure all resources(images, scripts, pages, sessionCookie) with https ASP.NET MVC web-site and also redirect from http to https [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I would like to know how to redirect from **http** to **https** but keep all the resources in safety.
I know IIS' Require SSL protect all resources of the site. But what about redirecting? If I use URL Rewrite module, I have to disable Require SSL option on IIS. Can I teach my site to redirect from http to https but also secure all the resources?
And yes, I must protect all the resources of my web-site. Web-site will be over only by https.
Thank you.
One option you could consider would be to have 2 websites, one for normal page requests and the other for resources.
Your resource website would only support https, and it wouldn't need to handle redirects.
Your main website would serve both http and https, and issue redirects from http -> https using whatever method you wished, be the URL Rewrite module or MVC's [RequireHttps] attribute.

Resources