[Django]-Underscore in subdomain label.. valid or not?

4đź‘Ť

âś…

Underscores are not valid characters, even in subdomains, so it will be marked as invalid. However, some sites that dynamically route requests based on a subdomain component do allow underscores, even though they’re technically an invalid character. So you might be able to navigate to the URL, even though it’s technically not valid.

RFC 1035 discusses the structure of a domain name.

👤mipadi

4đź‘Ť

according to Can (hostname) subdomains have an underscore "_" in it? it should be legal.

It is perfectly legal to have an underscore in a domain name. Let me quote the standard, RFC 2181, section 11, “Name syntax”:

👤blanche

Leave a comment