How to upload a file to the root folder of my Shopify store?

IncredibleHabit
Shopify Partner
5 0 23

I need to regain control of my Google Analytics account (a marketing consultant set it up for a current client, and she doesn't have the login on hand). Google has instructed me to upload a .txt file to the root folder (i.e. public_html) of her Shopify store with specific language, which they can then reference as confirmation that we own the site. How can I accomplish this with Shopify?

0 Likes
PaulNewton
Shopify Partner
2579 134 440

There is not root in the common sense like if you were self hosting a website or CMS.

 

The service asking for verification should be able to provide a meta verification tag that you can add to your themes theme.liquid file in the <head> area of the code.

See https://help.shopify.com/en/themes/customization/store/verify-domain-with-third-party-services

 

A workaround is adding it to the themes assets files, then using {{ '.txt' | asset_url }} in your theme to get the url where the assets is available online.

Or the admin files and use the file_url filter instead

Then in the admin setup a navigation redirect to to point from the "mydomain.com/.txt" to the actual asset url, results will vary.

 

 

 

 

 

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
Spornia
Tourist
3 0 1

watch this video. if you still havent been able to verify your website.

https://www.youtube.com/watch?v=6hxGMBKBrks

vallard
New Member
2 0 1

We had the same issue.  We uploaded the file as an asset.  Then we found the CDN where it was being loaded to.  Then we went to navigation and created a URL Redirect to the file where it is in CDN.  We will see if they approve that.

0 Likes
keeth
New Member
2 0 0

Hi  Vallard,

 

Did they approve?

0 Likes
vallard
New Member
2 0 1
No 😢
PaulNewton
Shopify Partner
2579 134 440

To clarify my previous answer for google analytics uploading a file is not the only method,  just use the HTML Tag method (meta tag)

https://support.google.com/webmasters/answer/9008080?hl=en

 

 

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
Rome
New Member
2 0 1

thank you ! I followed the tutorial. the DNS method worked for me (and it was easy) you just have to wait a few minutes after saving your new DNS settings

Lakeside
New Member
3 0 0

Hello, I have tried to verify my domain with the Zoho method using an HTML file but it doesn't work. I can't create a file and upload on the root of my WebHost, and Zoho doesn't have a meta tag to place directly in my theme.file. How do I get the DNS of my provider since I got my domain from Shopify? I want to try to use the CNAME method. Thank you. 

0 Likes