In some places in quickstart examples are given with domain names ending in .dev. For example in the drush help qc command. The 'Link' module lets you add a field of type 'link' and does validation on it. Unfortunately domains ending in .dev are not validated by 'Link'. Resulting in a "not a valid URL" message and the entity not being saved.

I have posted an issue in that modules' queue. See #1179944: Support custom TLDs from the current hostname Unfortunately there are a lot of issues surrounding the validation of URL for the module. So I don't really expect any quick fixes there. See #1318938: An all-embracing attempt for URL validation and Input / Output Form Filtering
Furthermore, .dev domains aren't really valid URLs, so the 'Link' module has a point there.

'Link' does however accept the .local pseudo-TLD. Do you think it might be wise to switch to that in the examples (instead of .dev) ? Some reading up on the subject convinced me that .local isn't really the way to go either. Firstly, because it isn't really a valid URL either. Secondly, it is part of zeroconf/bonjour and only in 'Link' because MacOS needs it.

The best practice solution (DNS-wise) seems to be to use third or fourth level subdomains of your existing second level domains. But then we can't really use quickstart-create (or destroy) because it has a 16 character limit on the mandatory --domain option.

Finally, in RFC2606 4 TLD are reserved for 'internal' use. Also second level domains example.com (and .org .net) are reserved in this RFC. I suggest it might be best to upgrade the various pieces of documentation and examples to use one of these. The best option might be to use example.com as this is what is used in the drush examples / documentation.
But then the 16 char limit also needs to be stretched. As .example.com takes up 12 chars, leaving only 4 to identify the rest.

Unsure about the topic settings. Please change to what you feel is appropriate.

Comments

TravisCarden’s picture

Title: According to Link module .dev domains are 'not a valid URL' » Support longer domain names
Category: task » feature

There's nothing we can do about Link module's deficiency's, obviously. What we can address is the domain name length limit in Quickstart so that .localhost can be used as a TLD. Once that's done, we can update the example commands accordingly. Since MySQL 5 supports database names up to 64 characters in length, I'll have to see if there's anything actually driving the limit in Quickstart. Thanks for finding that RFC, @firfin. Good research.

firfin’s picture

Thanks for your reply Travis.
Instead of using .localhost it might be better to .example.com though? Only 2 letters difference and also valid. Furthermore it has the advantage of being more consistent with drush documentation.

Oh, and it circumvents the shortcoming in Link module ;-)