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

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

IncredibleHabit
Shopify Partner
5 0 27

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?

Replies 11 (11)

PaulNewton
Shopify Partner
6464 588 1371

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.

 

 

 

 

 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


Lakeside
Visitor
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. 

MARUJA
Visitor
2 0 0

Hi Paul, you are the best thank you very much for sharing this information, nice and simple. GRACIAS

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

Rome
Visitor
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

vallard
Visitor
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.

keeth
Visitor
2 0 0

Hi  Vallard,

 

Did they approve?

vallard
Visitor
2 0 1
No 😢
PaulNewton
Shopify Partner
6464 588 1371

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

 

 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


marysnaturals
Visitor
1 0 0

Here is what I did: I went to settings on my store.  If you scroll down toward to the bottom on the left nav, you will see a link for "files" for your site.  You will be able to upload ads.txt here.  After you get confirmation that the file is there (it might take a few seconds), your site should be ready to run Google Adsense.  It worked for me, I hope it helps.

demib
Shopify Partner
135 13 63

I had the same issue trying to validate IndexNow in Ahrefs but I found an easy workaround and documented it all here:

https://elevateapps.io/indexnow-ahrefs-shopify/

SEO Geek since 1996, consultant author and public speaker. Admin of the Shopify SEO Facebook Group

Was your question answered? Kindly mark it as an Accepted Solution 🙂