I have to verify an old website through Google's Search Console to get access to some old data.This domain name 301 redirects to the new website.When I try to verify the old website via DNS records, it fails. Is this because the domain redirects?
Verifying an old website in Google Search Console
google search console
Verifying your site with Google Search Console using the DNS TXT record method is not subject to website 301 redirects, 404 or even 403 forbidden, this is due to the fact that unlike the HTML meta verification Google does not need to visit your site. When using a TXT record method Google does a DNS lookup on your domain... for example you can view my txt records here. So what is the problem?The biggest cause is when people don't wait long enough, when changing or adding any DNS records to the domain it can take anywhere between a 1min to a whopping 72 hours to take effect. If you see them updated using a online tool such as MX tool box then it doesn't necessary mean they are updated for Google.The TXT record is incorrectly added, this could be caused by a incorrect string or because the value of the host is incorrect, some require blank others require @ etc.