﻿# Specify Endpoint Name

<!-- Version variant: core_9; default: [/nservicebus/endpoints/specify-endpoint-name.md](/nservicebus/endpoints/specify-endpoint-name.md) -->



Define the endpoint name at initialization time:

<!-- snippet: EndpointNameCode -->

```cs
var endpointConfiguration = new EndpointConfiguration("MyEndpoint");
```

<!-- endsnippet -->

See also:

* [Specify Endpoint Name in NServiceBus Host](/nservicebus/hosting/nservicebus-host/index.md#endpoint-configuration-endpoint-name)

## Input queue

By default, the endpoint's input queue name is the same as the endpoint's name.

The input queue name can be overridden:

<!-- snippet: InputQueueName -->

```cs
endpointConfiguration.OverrideLocalAddress("MyEndpoint.Messages");
```

<!-- endsnippet -->

> [!NOTE]
> Changing the input queue may also require adjusting the routing configuration so senders can send messages to the renamed queue. See [routing configuration](/nservicebus/messaging/routing.md).
