Re: how to upload html file to root directory of shopify

how to upload html file to root directory of shopify

mitchsanchez
Visitor
2 0 0

Hi,

 

I'm trying to verify my shopify so that facebook ads will work. I;ve done it via DNS and meta except i can't wait the 72 hours for that to register. Can anyone assist with doing it via html file? I've read all the tutorials that i can find but haven't been able to locate a walkthrough of how to do it.

 

Thanks

Replies 63 (63)

diego_ezfy
Shopify Partner
2969 571 915

Hello,

Technically speaking you can't use html within Shopify, we use .liquid which is, succinctly and in layman terms, a "HTML with superpowers". 

Anyhow, your goal seems a bit hazed: what exactly do you mean by verifying the Shopify account for Facebook ads?

Thank you

Regards,
Diego

mitchsanchez
Visitor
2 0 0

Hey mate.

 

Apologies, i'm probably not using the right terminology. This is my first time setting up an online store.

 

FB wants me to set up a specific code on my website (options are via DNS, meta-tag or HTML) so that it can verify that the ads that i run on FB are sending people to the right website. I think i only need to do it via one of those three methods, however apparently DNS and meta take up to 72 hours to be read by FB. So i'm trying to figure out how to do it with HTML (or liquid) so that it's instant. I've downloaded my specific HTML file but the instructions say to copy it to the root file of my website. Which is where i'm stuck...

 

Hope that clarifies my question.

 

Mitch

Mari_Fforde
Tourist
7 0 2

Hiya

I am having the same problem. I have tried verifying my Facebook Business account by adding a line of code into the <head> section of my theme.liquid but Facebook tells me it cannot verify even though I can see their required bit of code in the source. My other option is to upload an .html file to the root directory which is not possible as they look for a .html file and I can only create a .liquid file. 

Have you come across this issue of not being able to verify elsewhere?

 

Many Thanks

 

Goliath Merchandising

KatieL11
Tourist
4 0 9

Same here! Any help would be great!

drakedev
Shopify Partner
696 150 240

Facebook provides 3 options, but only 2 of them are viable in Shopify.

  • HTML: Shopify doesn't provide access to the root domain and you cannot add any files there
  • DNS: It is possible by adding a TXT entry to your DNS record. That could take up to 72-hours, but usually it is much faster
  • Meta-Tag: this will allow to almost immediate verification, but you need to customize your theme code. That is a simple operation and can be done inside theme.liquid file inside layout folder of your theme
If my answer was helpful click Like to say thanks
If the problem is solved remember to click Accept Solution
Shopify/Shopify Plus custom development: You can hire me for simple and/or complex tasks.
Leikiniz808
Visitor
1 0 5

I have tried multiple times to add facebook verification into <HEAD> section but it does not allow me to verify. Pls help. 

bhomegoods
Visitor
1 0 2

i am getting this same problem. any help will be appreciated 

pinknpeachparty
Visitor
1 0 1

hope someone can help us on this.. im having the same issue as well.

popejmp
Visitor
1 0 1

Me to

Bluebasil
Visitor
2 0 2

Did anyone get a resolution to this as I am having the same issue.

Sky228
Excursionist
32 0 8

I figured it out not sure if your website is live but if it is not you have to disable your password on the site. I found this Shopify link to help 

 

https://shopify.dev/tutorials/customize-theme-verify-domain-with-third-party-services

 

Sadasd0209
Visitor
1 0 0

THANK YOU!! Literally I had been trying and once I removed my password. Boom it worked. YOU ARE A LIFE SAVER

Uzairkh
Visitor
1 0 1

This actually works!!!!! Thanks 

thinesHH
Visitor
1 0 0

Replying to confirm this is the best source/explanation. Video will walk you through all the necessary steps regardless of the public/private status of your storefront website.

corwingivens
Visitor
2 0 6

Hi Popejmp,

To verify your domain in FB Business manager you need to follow this Verifying Your Domain. Once you complete the guide. locate your Meta Tag Verification Code in FB Business Manager business settings> brand safety> Meta Tag. The code will look like this: <meta name="facebook-domain-verification" content="your special identifier" />

Copy that code. 

Login to Shopify 

Online store > Themes > Edit Code > Theme.liquid

Locate the ending header tag </header>  in the theme.liquid file and paste the code right above.

Go back to FB Business Manager, business settings> brand safety> Meta Tag > Verify

 

juliahickman
Visitor
1 0 0

This worked! Thank you!

toddlamming
Visitor
1 0 1

I am struggling today.

One minute I have access to Instagram shopping and I think everything BTS is complete and I no longer have to deal with facebook mafia but it looks like 30mins later I have all my social media shopping revoked and said that my domain needs to be verified. I have tried all the above strategies and pasted the correct code into my theme.liquid but still no luck.

I just get this message every single time...

Screenshot 2021-04-15 at 18.48.39.png

 

I have run out of ideas. My domain name is correct and the same as my site domain. All my accounts are correct with facebook buisness. I do not know what I am missing?

 

Please help!

Alfonso33
Visitor
2 0 1

Hello im trying to locate to Upload a ads.txt file to the root directory of my shopify store for google adsense but i dont know where the file is and where to upload the ads.txt file. Can you please help?? 

morganandjoel11
Visitor
2 0 0

I have done this exact process over and over today and it's still not verifying. I've even verified that it's in the HTML of the website, but FB still won't verify.

eleganzestore
Visitor
1 0 1

this was the only thing that worked. especially important to place the meta tag above <head> in the code

wangxin
Visitor
1 0 0

Have you solved the problem of Facebook domain verification? How did you do it?

Sky228
Excursionist
32 0 8

is your website live?

Tanisha
Visitor
2 0 0

same here. it asked me to use the debugging code but i keep getting these errors:

 

"Inferred Property

The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags."

 
"Missing Properties
 
The following required properties are missing: og:url, og:type, og:title, og:image, og:description, fb:app_id"
WBY
Visitor
1 0 2

Adding this comment in the hope it helps someone else. Verifying with a meta-tag has been doing my head in. Been trying for days - did the whole Facebook Sharing Debugger tool, it was scraping the site and seeing the verification code. But no matter what I did, the green 'Verify Domain' button (which you can see on the other options of Upload HTML or Upload DNS TXT record) wouldn't show up. There was no scroll on the window, so it wasn't like I just needed to scroll down further on the page to see it. Was tearing my hair out....until....

I thought to myself 'I wonder what happens if I zoom out in the browser' so I hit Chrome's three dots, click the zoom to 90% and bingo, there's the button. All this time, Facebook's stupid website wasn't set up to deal with a window size that wouldn't show all the page content, and there was no way to scroll to it.

Clicked the (now visible) green 'Verify Domain' button and hey presto, did it instantly.

So, before you give up and throw your laptop or tablet out the window, give the browser zoom a try (you might need to zoom out further than I did) - it might just be what you're looking for!

fcelia_gomez
Tourist
14 0 2

You are amazing. I did this and you were right!! Thanks

Schinkinator
Visitor
2 0 0

Literally did the same thing lmao

Wajdy
Visitor
2 0 1

i did as you said. i put the meta tag in the theme liquid under layout folder under header and it still didnt work. Then i tried putting it above the header but still didnt work. I confirmed it by looking at the page source and its there,

corwingivens
Visitor
2 0 6

Please see attached for reference of code placement. Make sure you are using the snippet of code that FB provides you. Save and publish. Screen Shot 2021-01-29 at 9.48.10 AM.png

basoul2020
Tourist
3 0 4

Hello, has anyone else tried this? I did exactly as shown in the picture but it is still not working?

PardonThePress
Visitor
1 0 0

mines still dont work I did everything right 

basoul2020
Tourist
3 0 4

Is there any other reason why this meta tag may not work? When I checked the html source, the meta tag is showing up from what facebook provided, so I don't know why it's still not verified?

Wajdy
Visitor
2 0 1
I had to wait a couple hours
basoul2020
Tourist
3 0 4

It's been about 16 hours for me and it still can't verify???

gator93
Visitor
1 0 3

I had the same issue and the solution that worked for me was placing the code right below the <head> tag, towards the top of the theme.liquid code. It didn't work for me when I added it just above the </head> tag.

Good luck!

trystan14
New Member
5 0 0

worked for me!

TEFLC2020
Tourist
6 0 4

Just wanted to pop on to say that uploading the code right below <head> also worked for me.  It didn't verify straight away but I left it overnight and it had verified when I checked in the morning

Ande1989
Visitor
1 0 0

this is what finally worked for me lol THANK YOU!

 

KalebAnderson
Visitor
1 0 0

Did it say it was unable to verify it but then after a couple of hours it was able to? Or was it just loading for a couple of hours?

TheCaribbeanHut
Visitor
1 0 0

I had to log into my facebook on my cell phone. On Chrome it doesnt show you the verify button. Now its verified for me. Took me 3 hours to see that I needed a different browser.

morganandjoel11
Visitor
2 0 0

I don't see a "Publish". It looks like when I his "Save" it's automatically publishing since it's already a live site. Is that correct?

 

michael_baker2
Shopify Partner
3 0 0

Like many others here, unfortunately this doesn't work for me

Jakefj
Visitor
1 0 1

Have the people who struggled to get it verified, verified it now? Because I’m struggling now

EmpressLeggins
Visitor
1 0 0

Thanks for the information!! Please note you will need to add the HTML link to the bottom of the "theme... liquid file...inside layout folder of your theme."

Haley2
Visitor
1 0 0

Re: Meta-tag method, I am at the layout theme.liquid.

 

Can I just pate the copied facebook-domain verification on the very beginning of No1. line?

Please advise on where is the head to paste the copied txt to theme code. 

Haley2_0-1617159953212.png

 

BCStudios
Visitor
1 0 0

Hello!

I was verified right away with Facebook. You have to add the meta verification file at the end of Theme. Liquid.

Between Body and HTML. (Between 143 & 145)

See the screen shot below.

I hope this helps.

Screen Shot 2021-04-02 at 2.00.56 PM.png

 

kittyandkaty
Tourist
10 0 1

I have been trying this for days. I have tried just below <head> and just above <head> and at the bottom between </body> and </html>

No luck at all. =/

kittyandkaty
Tourist
10 0 1

I filled in the form here with facebook https://www.facebook.com/help/contact/commerce

. It said verified then when i refreshed on the FB Business page. Still showing as needing to verify on my shopify but i think it is perhaps just trying to catch up with the change with FB.

TEFLC2020
Tourist
6 0 4

I successfully did this last month but however, shortly after, Instagram has revoked my absolute to use Instagram shopping saying the domain listed on insta is not connected & customers can not check out. As it happened around the same time as I changed my html file I’m wondering if the two are linked. Has anyone else experienced similar?

dr3wdog7
Visitor
1 0 2

Not sure if everyone having problems with this has figured it out... but in case you haven't, I have:

I tried all three (html, meta and DNS), but couldn't get it "verified" UNTIL I refreshed the FB page, typed in my two-factor authentication code and pasted the meta-code right underneath the <head> line, as instructed. Within minutes, I was "verified". 

Refresh your FB Business Settings page and do what I did--I think that's why we're having problems. Good luck!