---
title: Add, rename, and remove hosts
source: https://docs.newrelic.com/docs/apm/agents/manage-apm-agents/configuration/add-rename-remove-hosts
---

You can add and remove hosts for your applications. You cannot rename an existing host, but you can create applications named after a host or cluster. You can also [assign a cosmetic label to the host](#display_name), to differentiate hosts without changing the underlying hostname setting.

## Add hosts [#adding_hosts]

To add a host for monitoring, install the agent and start up your application. The host running the application will be identified to New Relic and will automatically appear on the site after a few minutes.

## Rename hosts [#renaming_hosts]

It is not possible to change the hostname. However, you can [create applications named after a host or cluster](https://docs.newrelic.com/docs/site/renaming-applications). For example, if hosts `ey01-s00057` and `ey01-s00058` are both part of a production [tier](https://docs.newrelic.com/docs/accounts-partnerships/education/getting-started-new-relic/glossary#tier), you can create an application called `App - Production` and have those two hosts report to it.

## Change display name of hosts [#display_name]

You can also assign a display name to a host, to easily distinguish dynamically assigned hosts. This display name does not affect the link between an app and its parent host. The display name appears in the APM UI to decorate the automatically assigned `host:port` name.

In the following example, `QA Server` and `Local Dev Server` are display names:

![crop-cosmetic-label-hostname.png](https://docs.newrelic.com/images/apm_screenshot-crop_host-name-display.webp "crop-cosmetic-label-hostname.png")

To set a display name:

| New Relic agent | Set the host display name                                                                                                                                                                                                                                                                                                                                    |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Go              | Edit the Go agent [`HostDisplayName` configuration setting.](https://docs.newrelic.com/docs/agents/go-agent/instrumentation/go-agent-configuration#host-display-name)                                                                                                                                                                                        |
| Java            | [Edit your config file or environment variables](https://docs.newrelic.com/docs/agents/java-agent/configuration/hostname-logic-java#display-name). However, if the Java agent [detects an instance name](https://docs.newrelic.com/docs/agents/java-agent/configuration/hostname-logic-java#instance-names), APM uses that name instead of the display name. |
| .NET            | Edit `displayName` attribute in the `processHost` element of the .NET agent config file or [environment variables](http://docs.newrelic.com/docs/agents/net-agent/configuration/net-agent-configuration#host-name).                                                                                                                                          |
| Node.js         | Edit `display_name` in the `process_host` section of your config file.                                                                                                                                                                                                                                                                                       |
| PHP             | Edit `process_host.display_name` in your **newrelic.ini** file.                                                                                                                                                                                                                                                                                              |
| Python          | Edit `process_host.display_name` in your config file.                                                                                                                                                                                                                                                                                                        |
| Ruby            | Edit `process_host.display_name` in your config file.                                                                                                                                                                                                                                                                                                        |

## Remove hosts [#removing_hosts]

To remove a host, use either option:

-   [Uninstall](https://docs.newrelic.com/docs/agents/manage-apm-agents/installation/uninstall-agent) the agent.
-   Disable it by editing or removing the agent configuration file. Make sure that all application host instances (Passenger, Jetty, etc.) have been fully restarted after disabling the agent.

Occasionally, rogue application server processes will continue reporting data. In this situation your [app's health status indicator](https://docs.newrelic.com/docs/using-new-relic/welcome-new-relic/getting-started/glossary#health-status) will appear green, even though you shut the agent down and verified that no data is reporting. Check your web server for stray processes, or get support at [support.newrelic.com](https://support.newrelic.com "Link opens in a new window").

Once you've uninstalled an APM agent from a host instance, it may take up to 75 minutes for the old host to disappear from the APM view. If you've removed a host by uninstalling the infrastructure agent, it may take up to 24 hours for it to disappear.
