# EndpointHostHelpers

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/EndpointHostHelpers.cs)

Provides helper methods for validating localhost addresses.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public static class EndpointHostHelpers
{
    // ...
}
```

## Methods

- [IsDevLocalhostTld(string?)](/reference/api/csharp/aspire.hosting/endpointhosthelpers/methods.md#isdevlocalhosttld-string) : `bool` `static` -- Determines whether the specified host ends with ".dev.localhost".
- [IsDevLocalhostTld(Uri?)](/reference/api/csharp/aspire.hosting/endpointhosthelpers/methods.md#isdevlocalhosttld-uri) : `bool` `static` -- Determines whether the specified URI uses a host that ends with ".dev.localhost".
- [IsLocalhost(string?)](/reference/api/csharp/aspire.hosting/endpointhosthelpers/methods.md#islocalhost-string) : `bool` `static` -- Determines whether the specified host is "localhost".
- [IsLocalhost(Uri?)](/reference/api/csharp/aspire.hosting/endpointhosthelpers/methods.md#islocalhost-uri) : `bool` `static` -- Determines whether the specified URI uses a host that is "localhost".
- [IsLocalhostOrLocalhostTld(string?)](/reference/api/csharp/aspire.hosting/endpointhosthelpers/methods.md#islocalhostorlocalhosttld-string) : `bool` `static` -- Determines whether the specified host is "localhost" or uses the ".localhost" top-level domain.
- [IsLocalhostOrLocalhostTld(Uri?)](/reference/api/csharp/aspire.hosting/endpointhosthelpers/methods.md#islocalhostorlocalhosttld-uri) : `bool` `static` -- Determines whether the specified URI uses a host that is "localhost" or ends with ".localhost".
- [IsLocalhostTld(string?)](/reference/api/csharp/aspire.hosting/endpointhosthelpers/methods.md#islocalhosttld-string) : `bool` `static` -- Determines whether the specified host ends with ".localhost".
- [IsLocalhostTld(Uri?)](/reference/api/csharp/aspire.hosting/endpointhosthelpers/methods.md#islocalhosttld-uri) : `bool` `static` -- Determines whether the specified URI uses a host that is "localhost".
