How to Lookup a CNAME via SSH

In this tutorial, we will show you how to lookup a CNAME record using SSH. This can be an important step when troubleshooting redirect issues. Performing this test via SSH can save time, since it can be done right in a terminal. We also have a helpful guide on how to create a CNAME record.

CNAME Lookup

  1. Login to your server via SSH.
  2. Run the following CNAME lookup command. Be sure to replace example.com with the domain you want to check.

    host -t cname example.com

    You should see a response similar to this, but it will differ based on the specific domain.

    example.com is an alias for test.travelworld58.com.

    In this example, you see the domain is an alias of another URL. If the domain does not have a CNAME you will see the following result:

    example.com has no CNAME record

Congratulations, now you know how to lookup a CNAME record using SSH!

IC
InMotion Hosting Contributor Content Writer II

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+