The MU forums have moved to WordPress.org

Passing the Google Sitemap verify file for your blogs. (15 posts)

  1. drmike
    Member
    Posted 17 years ago #

    - Create an empty txt file within your site's root directory. Name it something simple like googleverifyfile.html

    - Add to the root's .htaccess file the following:

    RewriteRule ^google(.*).html googleverifyfile.html

    I placed it right above the rewrite line for uploaded files. Might be a good idea because it may be redirected elsewhere into the individual blog directories if you didn't.

    - Go do the Google thing for the sitemap. When you get to verify, ignore what it says and just click on the Verify button.

    - Should work fine.

    Gotta admit that this was too easy. Google makes this big deal about having to have the specific named file in place yet I was able to work around it with a simple redirect. I would think that it would have checked for that.

    *shrug* Oh well. :)

    Hope this helps,
    -drmike

  2. pikey
    Member
    Posted 17 years ago #

    does this still work?

    I am still getting the following error on googlemanager with or without your hack.

    Verification status: NOT VERIFIED
    We've detected that your 404 (file not found) error page returns a status of 500 (Internal server error) in the header.

  3. drmike
    Member
    Posted 17 years ago #

    Yup, still works. (This is a simple Apache redirect.) See the bit about 'server error' in there? You might want to check the server error logs to see if the problem has been recorded.

  4. selad
    Member
    Posted 16 years ago #

    To anyone that is using this method please note that this is a security and privacy breach and this rule should be removed.

    For obvious reasons I will not post here how this method could be exploited (will post back in a few days to explain).

  5. drmike
    Member
    Posted 16 years ago #

    Hmm, probably is....

    The current work around we have over at wp.com is to name a page the name of the requested file.

  6. selad
    Member
    Posted 16 years ago #

    Naming a page with google*.html will trim the dot (.) and result google*html unless there is some rule for it.

  7. drmike
    Member
    Posted 16 years ago #

    Yup, at least there's something in place over at wordpress.com doing that:

    http://jalaj.net/2007/05/21/get-your-wordpresscom-blog-google-verified/

    (I assumed that it was Google loosing the dot.)

  8. selad
    Member
    Posted 16 years ago #

    I know its working for wp.com but on a regular install of wpmu it doesn't.
    See:
    http://jalaj.net/2007/05/21/get-your-wordpresscom-blog-google-verified/#comment-3143

  9. drmike
    Member
    Posted 16 years ago #

    There's a comment further down about leaving off the '.html' all together from teh page name. Someone care to try that?

  10. selad
    Member
    Posted 16 years ago #

    No. It does not work on a regular install of wpmu.

  11. carsong
    Member
    Posted 16 years ago #

    The rule is:

    RewriteRule ^google(.*).html$ google$1.html

    The stuff in parenthesis is stores everything between google and .html.

    The stored contents are later accessed with $1

    So this rule means:

    For uri starting with

    google

    followed by anything, store the anything, and ending with

    .html

    replace the uri with:

    google[anything from the match in match step].html

  12. drmike
    Member
    Posted 16 years ago #

    Cool beans. Thanks :)

    I hate rewrite rules.

  13. jalaj
    Member
    Posted 16 years ago #

    Danger : Using this hack on your wpMU is going to enable anyone anywhere to add everyone's blog into his webmasters account getting the statistics he is not eligible for.

    RewriteRule ^google(.*).html googleverifyfile.html

    The links above to my blog, show how a blog could be verified by creating a page. This method, was reportedly unavailable earlier, and might have opened up by some rewrite rule that allows redirection to a page named without the DOT in place.

    It would be better if a rewrite rule similar to one above is suggested so that only the blog owner can avail of google verification, by creating a page.

  14. nodblogcom
    Member
    Posted 16 years ago #

    To verify your blog just upload the Add-Meta-Tags plugin and use the meta verification method in google sitemaps. Hope this helps...

  15. RDI
    Member
    Posted 15 years ago #

    Or very easy - use the All in One SEO plugin:
    http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/

    Add the google code in it's entirety to:

    Additional Post Meta Tags: or
    Additional Page Meta Tags:

    Hope that helps - verified with google immediately !

About this Topic