InMotion Hosting Support Center

Changing the hostname of your server may be necessary for several reasons. For example, if you are utilizing your server as a Mail Server for your domain(s) hosted, then changing the hostname can prevent your emails from going to Spam/Junk. In this article, you can learn how to change your server's hostname from the command line.

Before You Begin

Review the warnings and notes below, to ensure a smooth transition from one hostname to another.

Change Hostname

  1. SSH into your server using the root user.

  2. Run the following command:

    hostname server.example.com
  3. The prompt should appear, without any output being displayed. You can run the following command to confirm the hostname has been changed:

    hostname

    The output should display similarly to the example below:

    root@example.com ~ $ hostname
    server.example.com


Congratulations! Now you know how you can change the hostname of your server from the command line.

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved. Please click the button below to be redirected to the login page.

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!