Atom Login Admin

Above the clouds

Site verification with Flask, start using the Webmaster Tools

written on Sunday,January 20,2013

This article is about the things that I've practiced in SEO Google App Engine.
First of all, I am beginner about SEO.
Therefore we introduce one by one for SEO that I practice
I want to continue to grow their knowledge.

This time, introduce registering your site with Webmaster Tools as an introduction.
So, Requires a Google Account. If you have not account, then create it.
Register the first site in the form below:

Webmaster tools register site

Next,verify the owner of the site,
Google provides two ways to verify a site - via a meta tag in your index page, or via a dedicated html file.

You just keep Routing in the following ways: If you are creating an application with Flask.

  • app.py
from flask import Flask
from werkzeug.routing import BaseConverter

app = Flask(__name__)

class RegexConverter(BaseConverter):
  def __init__(self, url_map, *items):
    super(RegexConverter, self).__init__(url_map)
    if len(items)>0:
      self.regex = items[0]

app.url_map.converters['regex'] = RegexConverter

@app.route("/<regex([a-z0-9]+):verification_str>")
def site_verification(verification_str):
  """Returns site verification content"""
  return render_template("site_verification.html",
      verification_str=verification_str)
  • site_verification.html
google-site-verification: {{ verification_str }}

You can use Webmaster tools , If verified your site.
So now, you can check indexing status and optimize visibility of their websites.:)

Comments

Add Comment

Login
This entry was tagged #SEO #Flask #GAE