Questions tagged [hostname]

A hostname is a human-readable nickname that is assigned to a device connected to a computer network and that is used to identify the device.

A hostname is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication such as the World Wide Web, e-mail or Usenet. Hostnames may be simple names consisting of a single word or phrase, or they may have appended a domain name, which is a name in a Domain Name System (DNS), separated from the host specific label by a period (dot). In the latter form, the hostname is also called a domain name. If the domain name is completely specified including a top-level domain of the Internet, then the hostname is said to be a fully qualified domain name (FQDN).

1162 questions
54
votes
1 answer

What is the maximum length of a DNS name

I saw several mentions that the maximum string length of a DNS name (domain name) is 253 characters. Wikipedia seems to be referring this old blog…
Nicolas Bouvrette
  • 4,295
  • 1
  • 39
  • 53
54
votes
4 answers

Alias hostname for localhost

Assuming that a local Python-Script is running a webserver. Is there any way to set an alias, so that http://localwebapp/ equals http://localhost:1234/? Edit: Or at least http://localwebapp:1234/ equals http://localhost:1234/?
WhatIsName
  • 2,294
  • 4
  • 24
  • 36
51
votes
10 answers

Can we set easy-to-remember hostnames for EC2 instances?

I'm running a couple of standard Fedora instances on EC2. I feel the public hostnames of the instances assigned by Amazon are too weird and hard to remember. I'd like to change them to something short (like red/blue/green/etc). Is there any draw…
Nikhil Gupte
  • 3,266
  • 4
  • 25
  • 15
50
votes
4 answers

Get hostname from Rails controller

I am trying to get the hostname of the machine which a rails application is running on from the controller. What would be the best way to do this taking into account it should work on both windows and linux?
RailsSon
  • 19,897
  • 31
  • 82
  • 105
49
votes
3 answers

How to get full host name + port number in Application_Start of Global.aspx?

I tried Uri uri = HttpContext.Current.Request.Url; String host = uri.Scheme + Uri.SchemeDelimiter + uri.Host + ":" + uri.Port; and it worked well on my local machine, but when being published to IIS7, there is an exception…
Leo
  • 2,173
  • 6
  • 28
  • 37
45
votes
5 answers

How can I get a the host name (with port) that a servlet is at

I thought ServletContext might provide a method. Does the getAttribute() method of ServletContext provide any help i.e. is there an attribute name (maybe "host", "port") that will be of help. The reason for this is I want my application to run…
Ankur
  • 50,282
  • 110
  • 242
  • 312
42
votes
1 answer

What does MySQL "::1" hostname refer to?

On a freshly installed (windows version of) MySQL 5.5.9 SELECT user, host FROM mysql.user gives: user host root localhost root 127.0.0.1 root ::1 localhost But what IP/hostname does ::1 stand here…
mlvljr
  • 4,066
  • 8
  • 44
  • 61
41
votes
14 answers

Running IIS Express with admin privileges

This has been asked before but was closed as "Not a real question" https://stackoverflow.com/questions/7450813/how-to-run-a-site-with-administrative-privileges-in-iis-express-7-5 However I think it is a genuine question as I also need to do this,…
Morvael
  • 3,478
  • 3
  • 36
  • 53
40
votes
6 answers

Java SSL: how to disable hostname verification

Is there a way for the standard java SSL sockets to disable hostname verfication for ssl connections with a property? The only way I found until now, is to write a hostname verifier which returns true all the time. Weblogic provides this…
paweloque
  • 18,466
  • 26
  • 80
  • 136
40
votes
14 answers

Rename Google Compute Engine VM Instance

How do I rename a Google Compute Engine VM instance? I created a new LAMP server and I'd like to rename it in the "VM Instances" dashboard. I've tried renaming the Custom metadata, but that didn't seem to replicate to the dashboard.
mickeylieu
  • 403
  • 1
  • 4
  • 5
39
votes
1 answer

Host Name Vs Canonical Host Name

Can anyone please explain me the difference between Host Name and Canonical Host Name? I am currently using InetAddress class to fetch host name using the IP Address. I came across these 2 APIs. So I am just wondering, which one I should opt for?
Aryan
  • 1,767
  • 2
  • 22
  • 39
37
votes
8 answers

Java: Common way to validate and convert "host:port" to InetSocketAddress?

What is the common way in Java to validate and convert a string of the form host:port into an instance of InetSocketAddress? It would be nice if following criteria were met: No address lookups; Working for IPv4, IPv6, and "string" hostnames; (For…
java.is.for.desktop
  • 10,748
  • 12
  • 69
  • 103
36
votes
1 answer

python: check if a hostname is resolved

How can I have a function in python that returns 1 if the a hostname resolves and 0 if a hostname does not. I couldn't find anything useful, any thoughts? Thanks,
Amir
  • 5,996
  • 13
  • 48
  • 61
32
votes
9 answers

Validate a hostname string

Following up to Regular expression to match hostname or IP Address? and using Restrictions on valid host names as a reference, what is the most readable, concise way to match/validate a hostname/fqdn (fully qualified domain name) in Python? I've…
kostmo
  • 6,222
  • 4
  • 40
  • 51
31
votes
1 answer

Javascript: Difference between location.hostname and document.domain?

What is the difference between using location.hostname and document.domain? I think an explanation with an example would be helpful.
Andreas
  • 2,045
  • 5
  • 19
  • 30
1
2
3
77 78