Question
How can I verify a website is redirecting?
Answer
Using the curl
command with the -I
(fetch headers only) option will show if a URL redirects and where it redirects.
[root@server ~]cPs# curl -IL domain.tld
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Wed, 28 Jun 2023 12:35:39 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: https://new.domain.tld/
In the above example, the "Location" line shows where the site redirects to.
You can manage redirects through your cPanel interface via the "Redirects" app in cPanel.