#605·chancejs

Add ability to generate random subdomains

Author: mstimvolCreated Aug 1, 2024Updated Jun 23, 2025

At first, thank you very much for this awesome library! I've a feature request and I think this can be useful :-)

I'm using the url() function, but what I'm missing is a "subdomain" feature. So for example:

chance.url({ subdomain: 'mydomain.tld' })

Generates urls like mibfu.mydomain.tld, socialradar.mydomain.tld or tainvoz.mydomain.tld. Would it be possible to provide something like that as well?