Python Script for Creating an XML Sitemap with rel=”alternate” hreflang=”x”

Google specifies three scenarios for which rel=”alternate” hreflang=”x” is recommended:

  1. You translate only the template of your page, such as the navigation and footer, and keep the main content in a single language. This is common on pages that feature user-generated content, like a forum post.
  2. Your pages have broadly similar content within a single language, but the content has small regional variations. For example, you might have English-language content targeted at readers in the US, GB, and Ireland.
  3. Your site content is fully translated. For example, you have both German and English versions of each page.

via Google Webmaster Tools Help

Similarly, there are three means for which hreflang can be implemented. It can be tagged with the element within the section of each page, expressed through the http header for non-html files, or within your XML sitemap. There is an obvious advantage to applying it within an xml sitemap for enterprise level sites, like the ones I tend to work on. Typically, it is much easier to get an updated xml sitemap uploaded than to apply new tagging to a myriad of pages. However, even when applied within an XML sitemap, it can a be tedious process for large websites. I created a quick python script to help make that process a little bit easier.

hreflang python tool usage

This is script is designed for a website where the alternate language site has an equal number of pages to the primary language. For example, there are the same number of pages for en-uk and en-ca as there are for en-us.
Continue reading

Can I use blackhat article spinning (spintax) for whitehat purposes?

Whilst chatting in our office last week, reminiscing of ye old SEO tactics such as article spinning, automated backlink tools, etc, we started talking about article spinning and how it might have some legitimate value in certain use cases.

But first, let’s just one thing straight: In no way do I / we condone the use of article spinning for the purpose of blog posts, news articles or anything in between. There is a time and a place for everything, and spinning an entire article to get a unique version just isn’t something I’d recommend. On the other hand their are a few uses that I think we could re-examine such as:

  • eCommerce descriptions
  • photo gallery descriptions
  • meta descriptions, in some cases
  • and a few more

Continue reading

How to Integrate SEO and Social Media Marketing

social media and seo

I’ve been busy blogging away over on Marketing Land about ways to integrate SEO and Social Media practices for mutual benefit.

The first piece, How to Leverage Social Media for SEO: Link Building, covers the integrating SEO and Social Media via link building. Check it out to learn how Google+, Twitter, YouTube, and Facbook (via Ads) can be utilized as effective tools in your link building arsenal.

The second piece, Creating Synergy Between Social Media And Search, moves away from the subject of link building and explores way that Social Media can aid a number of other SEO and PPC activities (as well as one way that Search can help Social).

Continue reading

Accelerated Mobile Pages (Google AMP) Hack to Add Lead Capture Forms

how to hack amp for lead generation and fast mobile sites

Update 5/15/2017: Refer to my new post about how to implement forms in AMP.

I’ve been working a lot with Google’s Accelerated Mobile Pages (AMP) Project as of late. The platform has a lot of restriction and doesn’t permit things such as third-party JavaScript and html form tags (so, lead-capture forms aren’t supposed to be possible within the AMP framework), but there is a weird workaround…
Continue reading

Sharing Other Peoples Content and Simultaneously Promoting Your Own

I share content created by other people and do not exclusively self-promote.

Social media is the main marketing channel that I use for personal branding. I frequently share content written by my competitors, content created by friends and acquaintances, content that I find interesting (but written by strangers), and sometimes, content that isn’t at all interesting to myself, but that I feel may be of interest to my audience.

There are plenty of reasons why one should share work that is not their own. It’s an easy way to foster online relationships, create a valuable experience for your audience, improve your visibility (by increasing your appearance in people’s social network feeds), and create a very human-image of yourself. It’s an image of a person that is a reliable source of information and an expert in his field- he is sharing all relevant information, not just items he created. This is how one can continue to earn trust and credibility.

gallup 2013: trust of marketers graphic
Continue reading