---
title: "How to Lookup a CNAME via SSH"
description: "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..."
url: https://www.inmotionhosting.com/support/server/ssh/cname-lookup/
date: 2018-09-07
modified: 2021-08-16
author: "InMotion Hosting Contributor"
categories: ["SSH and Root Access"]
type: post
lang: en
---

# 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](/support/domain-names/create-cname-record/).

## CNAME Lookup

1. [Login to your server via SSH](/support/server/ssh/do-you-provide-ssh-access/).
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**!
