Skip to content

Commit 14cfe68

Browse files
CopilotIEvangelist
andauthored
docs: document the 'Use *.dev.localhost URLs?' interactive prompt for aspire new
Agent-Logs-Url: https://github.com/microsoft/aspire.dev/sessions/49848864-c0a9-482c-a045-a860f76cb80f Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
1 parent 7eaf486 commit 14cfe68

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

src/frontend/src/content/docs/reference/cli/commands/aspire-new.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,45 @@ This command defaults to **interactive** mode. When executed without any options
3333
with Aspire templates as an alternative for project creation.
3434
</Aside>
3535

36+
## Interactive prompts
37+
38+
When running `aspire new` in interactive mode, the command asks one or more questions before generating the project. The available prompts depend on the template and options you provide.
39+
40+
### Use \*.dev.localhost URLs?
41+
42+
During project creation, you may be prompted:
43+
44+
> **Use \*.dev.localhost URLs?**
45+
46+
This prompt determines whether the generated launch profile configures your Aspire services to be accessible via `*.dev.localhost` wildcard subdomain URLs (for example, `https://myservice.dev.localhost`) instead of standard `http://localhost` with port numbers.
47+
48+
#### What are \*.dev.localhost URLs?
49+
50+
`*.dev.localhost` is a wildcard subdomain pattern that resolves to your local machine (`127.0.0.1` or `::1`) in all modern browsers—no DNS or hosts-file configuration is required. The ASP.NET Core HTTPS development certificate includes `*.dev.localhost` as a Subject Alternative Name (SAN), so browsers trust connections to any subdomain under `*.dev.localhost` when the certificate is installed and trusted.
51+
52+
#### Yes — use \*.dev.localhost URLs
53+
54+
Choosing **Yes** configures the generated project so that each service gets a unique subdomain URL such as `https://myservice.dev.localhost`. This option:
55+
56+
- Enables HTTPS for all services from the start, leveraging the wildcard development certificate.
57+
- Gives each service its own origin, which prevents cookie and authentication token collisions between services running on the same machine.
58+
- More closely mirrors a production setup where services are hosted on separate (sub)domains.
59+
60+
**Prerequisite:** The ASP.NET Core HTTPS development certificate must be installed and trusted on your machine. Run the following command if you haven't done so already:
61+
62+
```bash
63+
dotnet dev-certs https --trust
64+
```
65+
66+
<Aside type="note">
67+
Safari on macOS does not resolve `*.localhost` subdomains to `127.0.0.1` by
68+
default. If you use Safari, choose **No** or add an entry to your hosts file.
69+
</Aside>
70+
71+
#### No — use standard localhost URLs (default)
72+
73+
Choosing **No** (the default) configures services with standard `http://localhost:<port>` addresses. This option requires no certificate setup and works in all browsers and tools without additional configuration.
74+
3675
## Options
3776

3877
The following options are available:

0 commit comments

Comments
 (0)