The MU forums have moved to WordPress.org

Submitting for Google verification (18 posts)

  1. wehican
    Member
    Posted 15 years ago #

    I have a site installed on a subdomain, but using subdirectories on it. I tried submitting to Google, but it says it can't verify because an error page 200 is returned instead of a 404 using the html file and I don't have a clue where to put the meta tag alternative.

    On an Apache server.

    Any guidance out there?

  2. cafespain
    Member
    Posted 15 years ago #

    I have a site installed on a subdomain, but using subdirectories on it

    Sorry, can you clarify this?

  3. andrea_r
    Moderator
    Posted 15 years ago #

    I think he means something like http://blog.hisdomain.tld/muinstall/

  4. cafespain
    Member
    Posted 15 years ago #

    Oh ok.
    You have to place the HTML file in the root of your install.
    The meta tag goes in the header.php file of the theme you are currently using - unless you write a plugin to add it in for you, then that theme will have the meta tag for ALL users, so any other users using that theme will be unable to verify their site.

    Alternatively you can make a copy of the theme you want to use and enable it only for you - then add the meta key in that theme.

  5. wehican
    Member
    Posted 15 years ago #

    The install is the root of a subdomain and the user blogs are subdirectories.

    http://muinstall.mydomain.tld/userblog

  6. wehican
    Member
    Posted 15 years ago #

    I tried the html in the root of that subdomain and got the 404 thing. Thanks for the info on the meta tag, I will give that a try.

  7. andrea_r
    Moderator
    Posted 15 years ago #

    Doh, I need caffiene. yeah that meta thing should work.

  8. wehican
    Member
    Posted 15 years ago #

    Doh, I need some learning in HTML and PHP.

    I tried inserting that where I think it would go in the header.php and it didn't work. Line 6 of the default in my home theme directory.

    They said they couldn't find it.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta name="verify-v1" content="x1c7FPayFngqncWE0jJpetg8gnusIvwn7HJ+/PISb8g=" />
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>

  9. cafespain
    Member
    Posted 15 years ago #

    If you load you site in your browser and view the source, then can you see the meta tag in the source code your self?

    If you can, then cut and paste the url (including the trailing slash) from the address bar and paste that into the form on google and see if it can find it then.

  10. wehican
    Member
    Posted 15 years ago #

    No, I can't see it in the source. Thank you for a very good tip. I will experiment.

  11. cafespain
    Member
    Posted 15 years ago #

    Do you have wp-super-cache installed? if so, clear the cache and try again. It may be caching the older version of the template.

  12. wehican
    Member
    Posted 15 years ago #

    Thanks, cafespain

    I don't have any cache enabled that I know of. Pretty much default.

    Google's example for the tag is

    <html>
    Place meta tag after the <head> tag and before the </head> tag <head> <meta name="verify-v1" content="x1c7FPayFngqncWE0jJpetg8gnusIvwn7HJ+/PISb8g=" />
    <title> My title </title>
    </head>
    <body>
    page contents
    </body>
    </html>

    A problem is I can't find a <html> or a <head> in the themes/home/header.php. Got a </html>, though. :-)

    Onward through the fog.

  13. MrBrian
    Member
    Posted 15 years ago #

    I would just do the verification file.

  14. wehican
    Member
    Posted 15 years ago #

    Well, I got it to verify for now. Have to delve deeper into some things. I have the theme for the admin blog set as the home wp-default theme and tried the tags in the home/header.php. Wouldn't verify. Went to the default/header.php and dropped this in at the top before the
    <head profile="http://gmpg.org/xfn/11">
    and it worked.

    html>
    <head>
    <meta name="verify-v1" content="x1c7FPayFngqncWE0jJpetg8gnusIvwn7HJ+/PISb8g=" />
    </head>
    </html>

    Which leaves me scratching my head about which theme is which. I disabled the home default sitewide and enabled it just for the main blog. Even disabled the default sitewide to see if it removed that from the themes available for others, which it did. The admin blog still maintained it. So it must be the right one, huh? The home default?

    Confusing. I am using the global theme options plugin.

  15. wehican
    Member
    Posted 15 years ago #

    Just viewed the source of another blog using the default them and that tag shows up on it, so I guess I have some theme reconfiguring to do.

    Does Google require you to keep that tag after verifying?

  16. dsader
    Member
    Posted 15 years ago #

    Why not just an mu-plugin?
    <?php
    function wehican_google_verify() {
    if (is_home() || (function_exists('is_frontpage') && is_frontpage()) ) {
    echo '
    <meta name="verify-v1"
    content="wehican google code"
    />';
    }
    }
    add_action('wp_head', 'wehican_google_verify');
    ?>

    Make sure every theme in your stable has wp_head in the header.php.

  17. wehican
    Member
    Posted 15 years ago #

    dsader, thank you. Once I figure how to implement that I will do it. Coding is not my strength. Finding problems seems to be. :-)
    This should keep me busy the rest of the day.

    This business with the themes opened up a whole new area of confusion for me re the default and home themes. Would be nice if they had a roadmap of what opens what file instead of having to dig through tons of code with old worn out eyes and just a rudimentary knowledge of code structure.

  18. wehican
    Member
    Posted 15 years ago #

    cafespain, thank you very much. I copied the default, renamed it, put that meta tag into it then made it exclusive for me. Works like a charm.

    However, it did take a while to figure I had to also rename the css files in the theme directory. Hard to pick out which WordPress Mu default out of a bunch that I wanted. :-)

About this Topic