Quick example with tests of a small web application in Play 2.1 that can match subdomains in routes. It enables to use Include files (for example if you want to have an api.example.com defined in a api.routes files) and params (if you want to have http://[username].example.com/)