In case anyone in future or past still facing this kind of issue, here is the solution:
This or similar code is automatically added to your website (document) on page load, it usually added because of an extra “site owner” added in your google search console. And google search console doesn’t let you remove ownership of that extra or stranger owner email unless you delete above code from your website.
Here is what starts the complete process.
What adds above code automatically is a link tag here inside ‘theme.liquid’ file:
This code above start the process. but it’s a main part of your shopify store because verifies your ownership and page redirects that shopify has - backend stuff - this is not the problem here.
Go to your domain provider e.g godaddy, namecheap, or any other:
There go to dns records you will see a TXT record named - in my case - google-site-verification=yh1rFkJx8lErpIPigRyQM6GU3_EMzZmY5RHAo1qQZEE
You just need to remove that and then try to remove owner from search console, it will be done after 5-6 minutes wait at most..
Simple Steps
-
Go to Godaddy or any other domain provider you’re using.
-
remove TXT record you have ownership of - above image shows example of record added (match it first and then delete)
-
try now to delete ownership from google search console. it will be done