Zen Cart Logo
Forums / General Questions / Google - Verify site ownership

Google - Verify site ownership

Locked

Views: 26,144

Results 21 to 40 of 49
This thread is locked. New replies are disabled.
16 Feb 2009, 9:39 AM
#21
steve_mcleish avatar

steve_mcleish

New Zenner

Join Date:
Feb 2009
Posts:
1
Plugin Contributions:
0

Google - Verify site ownership

Zen cart 1.38a

I searched the forum and couldn't find my answer.

Which file do I add the google site verification meta tag to?

I tried uploading the google verification file and I could get that working either.

Any help would be great.

Steve

11 Mar 2009, 6:31 AM
#22
bmpt avatar

bmpt

New Zenner

Join Date:
Jan 2008
Posts:
76
Plugin Contributions:
0

Re: Google - Verify site ownership

DrByte:

...

  1. Create a new file named jscript_googleverify.php
  2. Put this into it ... just the code you need for Google (likely just the ONE line) ... (do NOT use any <?php or ?> tags in this file):```
    <meta name="verify-v1" content="blahblahblah"/>
> 3. Upload this new file into your custom template folder's jscript folder, like so:
> /includes/template/YOURTEMPLATE/jscript/jscript_googleverify.php
> 
> This will cause that file's contents to be displayed inside the <head> tag of your site ... and you won't have to touch the default html_header.php file, making upgrades simpler !

I recently had to update my meta verification,  I looked for hours trying to find where i put that tag. triple checked  html_header.php & metatags.php.    then i came across this thread, 
 thanks dr. for having all the BEST advise
3 Jun 2009, 3:56 PM
#23
silverkop avatar

silverkop

Zen Follower

Join Date:
Sep 2006
Location:
U.K.
Posts:
164
Plugin Contributions:
0

Re: Google - Verify site ownership

DrByte:

<font color="Gray"> 1. Create a new file named jscript_googleverify.php 2. Put this into it ... just the code you need for Google (likely just the ONE line) ... (do NOT use any <?php or ?> tags in this file):```
<meta name="verify-v1" content="blahblahblah"/> ```3. Upload this new file into your custom template folder's jscript folder, like so: > /includes/template/YOURTEMPLATE/jscript/jscript_googleverify.php > > This will cause that file's contents to be displayed inside the <head> tag of your site ... and you won't have to touch the default html_header.php file, making upgrades simpler !

This worked fine for me also, many thanks.

24 Jul 2009, 4:35 PM
#24
zean avatar

zean

Zen Follower

Join Date:
May 2009
Posts:
200
Plugin Contributions:
0

Re: Google - Verify site ownership

DrByte:

Rylynn, the combination of a couple different topics above makes things a bit confusing. In those cases, the right file to edit would be the html_header.php file.

HOWEVER ... there's an easier way that doesn't require editing any of your site core files !!

  1. Create a new file named jscript_googleverify.php
  2. Put this into it ... just the code you need for Google (likely just the ONE line) ... (do NOT use any <?php or ?> tags in this file):```
    <meta name="verify-v1" content="blahblahblah"/>
> 3. Upload this new file into your custom template folder's jscript folder, like so:
> /includes/template/YOURTEMPLATE/jscript/jscript_googleverify.php
> 
> This will cause that file's contents to be displayed inside the <head> tag of your site ... and you won't have to touch the default html_header.php file, making upgrades simpler !

Very good, however, this puts it in every page on the site, not just the home page.  Goggle's instructions are: "* . . . to add a meta tag with a unique value to your site's **home page***." (emphasis added)

Is there some way to just put it on the home page?

Thanks!
3 Aug 2009, 4:21 PM
#25
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Google - Verify site ownership

This is the way I went, and it worked just fine. Thanks!

21 Sep 2009, 12:02 PM
#26
predmond avatar

predmond

New Zenner

Join Date:
Apr 2007
Posts:
36
Plugin Contributions:
0

Re: Google - Verify site ownership

Thank heavens for DrBytes! What a time saver!

@Zean - from my experience with Google, all that is required is that it is there long enough for google to index it once. That is long enough for google to know you actually own the site (or that you can access it to modify it), and then you can remove it without any issues.

8 Oct 2009, 9:47 AM
#27
amebb avatar

amebb

Zen Follower

Join Date:
May 2008
Location:
UK
Posts:
406
Plugin Contributions:
0

Re: Google - Verify site ownership

Steve did the verification method work for your site ???

8 Oct 2009, 10:44 AM
#28
amebb avatar

amebb

Zen Follower

Join Date:
May 2008
Location:
UK
Posts:
406
Plugin Contributions:
0

Re: Google - Verify site ownership

Hi

I am using cherry Zen template and i didnt have the Jscript in the template folders.

So i created the jscript folder and then i placed the jscript_googleverify.php file into that.

I then went to google to request verification but nothing happened.

Am i doing something wrong ...?

Please help

Thanks

23 Nov 2009, 3:28 AM
#29
missinglife avatar

missinglife

Zen Follower

Join Date:
Apr 2009
Location:
Portland, OR
Posts:
104
Plugin Contributions:
0

Re: Google - Verify site ownership

DrByte:

Rylynn, the combination of a couple different topics above makes things a bit confusing. In those cases, the right file to edit would be the html_header.php file.

HOWEVER ... there's an easier way that doesn't require editing any of your site core files !!

  1. Create a new file named jscript_googleverify.php
  2. Put this into it ... just the code you need for Google (likely just the ONE line) ... (do NOT use any <?php or ?> tags in this file):```
    <meta name="verify-v1" content="blahblahblah"/>
> 3. Upload this new file into your custom template folder's jscript folder, like so:
> /includes/template/YOURTEMPLATE/jscript/jscript_googleverify.php
> 
> This will cause that file's contents to be displayed inside the <head> tag of your site ... and you won't have to touch the default html_header.php file, making upgrades simpler !

WOW! this is so much easier then any other solutions:clap:. it is only took me less then a sec to get it done.
Thank you so much!
28 Dec 2009, 7:15 PM
#30
nicnic avatar

nicnic

New Zenner

Join Date:
Dec 2009
Posts:
3
Plugin Contributions:
0

Re: Google - Verify site ownership

Right, this issue has driven me mad all day. If you are using a template other than the classic, you need to create the jscript folder. And add the file as described.

To find out a bit more of what the file is doing you can go to:
http://www.example.com/docs/read_me_jscript.html , where example is your domain name.

For example "www.nmfurniture.com/docs/read_me_jscript.html"

I also didn't notice the code changes every time you request it. So double check google is still looking for the code you are using.

25 Feb 2010, 9:14 AM
#31
salib avatar

salib

New Zenner

Join Date:
Oct 2009
Location:
Osaka, Japan
Posts:
44
Plugin Contributions:
0

Re: Google - Verify site ownership

DrByte:

Rylynn, the combination of a couple different topics above makes things a bit confusing. In those cases, the right file to edit would be the html_header.php file.

HOWEVER ... there's an easier way that doesn't require editing any of your site core files !!

  1. Create a new file named jscript_googleverify.php
  2. Put this into it ... just the code you need for Google (likely just the ONE line) ... (do NOT use any <?php or ?> tags in this file):```
    <meta name="verify-v1" content="blahblahblah"/>
> 3. Upload this new file into your custom template folder's jscript folder, like so:
> /includes/template/YOURTEMPLATE/jscript/jscript_googleverify.php
> 
> This will cause that file's contents to be displayed inside the <head> tag of your site ... and you won't have to touch the default html_header.php file, making upgrades simpler !
> 
> *
> NOTE: This will make the verification code show on every page of your site. However, since you only need the code in place for Google to read it ONCE, you can delete the new file again after Google has read it to verify your site once.*

Dear Sensei (先生)
Could we use the same technique to add a script for google's analytics? 
:blush:
11 Apr 2010, 3:09 PM
#32
darrenq avatar

darrenq

New Zenner

Join Date:
Apr 2010
Posts:
78
Plugin Contributions:
0

Re: Google - Verify site ownership

[QUOTE=salib;848630]Dear Sensei (先生)

I just did this and now i only see a white page with
Parse error: syntax error, unexpected '/' in /websites/123reg/LinuxPackage21/ga/me/be/gamebeta.co.uk/public_html/includes/languages/english/meta_tags.php on line 18"
and a white page. what has happened? I have lost my enitre website and cannit even log into my admin account now.
QUOTE]

11 Apr 2010, 3:15 PM
#33
g1smd avatar

g1smd

Zen Follower

Join Date:
Mar 2010
Location:
UK
Posts:
449
Plugin Contributions:
0

Re: Google - Verify site ownership

You've likely missed or added a quote somewhere close.

Check the code very carefully.

11 Apr 2010, 3:17 PM
#34
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Google - Verify site ownership

What's happened is that you've now ended up with a parse error - probably caused by white space after the closing php tag e.g. ?>

12 Apr 2010, 5:21 AM
#35
predmond avatar

predmond

New Zenner

Join Date:
Apr 2007
Posts:
36
Plugin Contributions:
0

Re: Google - Verify site ownership

You probably won't have to check the code too carefully - the error tells you where to look. It may be wrong, but if the only change you made was to insert the verification code, then I think it will be spot on.

I would start by opening meta_tags.php under includes/languages/english
Go to line 18, and make sure that all quotations are properly closed, and check that there is nothing else which is obviously wrong.

If you can't find anything, post the code here, maybe including a few lines above and below just in case.

19 Apr 2010, 6:56 PM
#36
darrenq avatar

darrenq

New Zenner

Join Date:
Apr 2010
Posts:
78
Plugin Contributions:
0

Re: Google - Verify site ownership

Yeah it was a simple quote missing. Thanks for your help
:D

19 Apr 2010, 11:09 PM
#37
g1smd avatar

g1smd

Zen Follower

Join Date:
Mar 2010
Location:
UK
Posts:
449
Plugin Contributions:
0

Re: Google - Verify site ownership

salib:

However, since you only need the code in place for Google to read it ONCE, you can delete the new file again after Google has read it to verify your site once.

Google reads that file/tag occasionally to be sure you're still authorised to be accessing the data they hold. If they find it is missing, they will 'unverify' the site and you'll need to reverify it.

I much prefer the 'verify by HTML file' method, where you upload a single HTML file to the root of the site. The name of that file is decided by Google.

21 Jun 2010, 2:55 PM
#38
lilguppy avatar

lilguppy

New Zenner

Join Date:
Jan 2010
Posts:
96
Plugin Contributions:
0

Re: Google - Verify site ownership

When trying Pieres option which is Try putting the code into the file includes/languages/english/YOUR_TEMPLATE/meta_tags.php where exactly do you place the code?

I also tried docs method and I dont have a folder called includes/template/YOURTEMPLATE/jscript/jscript_googleverify.php
After I click on my template I have these options
(folder) common
(folder) css
(folder) images
(txt) copyright
(php) template_info

So becuase I dont have "jscript" I am stuck
Pieres option of just puting the meta tag code into the meta_tags.php seems perfect but I am unsure in the exact location to place it. I placed it in 3 different spots in that folder and all the times my webage disapeared. Its back because I fixed it but im leary about trying this withotu more information

21 Jun 2010, 3:43 PM
#39
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Google - Verify site ownership

lilguppy:

I also tried docs method and I dont have a folder called includes/template/YOURTEMPLATE/jscript/jscript_googleverify.php
Just create the folder, and upload the new file to it.

21 Jun 2010, 5:48 PM
#40
lilguppy avatar

lilguppy

New Zenner

Join Date:
Jan 2010
Posts:
96
Plugin Contributions:
0

Re: Google - Verify site ownership

DrByte:

Just create the folder, and upload the new file to it.

When I make the file jscript then make a file inside of that called jscript_googleverify.php and put the code inside that file the first jscript doesnt show up in the line of files. So when I take out the first jscript and just keep the jscript_googleverify.php that shows up in my line of files. Ofcourse its still not verifying....:wacko: