EXT: Basic SEO Features

Extension Key: seo_basics

Copyright 2011, Benjamin Mack, <benni@typo3.org>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

EXT: Basic SEO Features	1

Introduction	1

What does it do?	1

Why did we create this extension?	1

Screenshots	2

Requirements	2

Sponsors	2

Users Manual	3

The installation	3

The new DB field	3

The new submodule	3

The XML sitemap	3

The source indenter	3

Known Problems	3

To-Do List	3

Change Log	3

Credits	3

Introduction

What does it do?

This extension bundles all SEO features needed for getting a simple website going with search engine optimizations. Well – so what does it do?

It adds an extra field to every page for manipulating the <title>-tag of the page. Since this is – next to the content – the most important data for a search engine of a webpage, it deserves an extra field. If the field is left blank for a page, the page title will be used. Also, the fields keywords and description are now available for the page type “standard”.

Also, keywords and description for a page as well as the last time a page was changed will be added to the output automatically. It does not add DC tags since we believe that search engines don't care about it that much.

A new submodule under “Web” => “Info” is added to have an overview over all <title>-tags, all keywords and all descriptions. It is possible to edit all fields at once, which is nice for comparing. When in editing mode this page shows where there are enough (or maybe too many) keywords, and colors the background of every field depending on the length of the content.

A new tag called the “Canonical Tag”, a tag in the head area of the webpage that the search engines wanted to avoid duplicated content.

It also relies heavily on the realurl extension, adding a new page type that is redirected automatically. Right after the installation of the SEO extension there is a new page type available that is mapped to “sitemap.xml” which means that if you enter www.your-typo3-page.com/sitemap.xml that you'll get the google sitemap / XML sitemap for all your pages.

One last nice thing is the formatting of the XHTML output. The extension takes care of the correct indention so the XHTML is nice to read. It removes all empty lines and indents almost correctly. We don't think that this feature is quite important for the search engines, but it helps to understand the generated HTML better.

There is no need for an extra “google sitemap” extension, no need for an extra “metatags” extension or the source optimizer.

Why did we create this extension?

Well, first of all... we did quite some research and did some tests with pages to see how manipulating e.g. the page title or the description affects the ranking and also the output on the search result pages. We then found out what is important for the search engines and what they care about. Then we tried out several extensions but we found that they are not quite usable e.g. several googlesitemap extensions weren't working as expected and not out of the box. We also wanted one extension that does almost most of the things out of the box, so there's not a lot to configure.

We wanted to have an extension to get new installations up and running with SEO pretty fast, without a lot of configuration and without dozens of not-quite-perfect extensions.

Screenshots

Search Engine Optimization Overview Page (german example: www.weissleder.de)

Search Engine Optimization in Editing Mode (german example: www.weissleder.de)

Requirements

Actually, you only need to install the extension and make sure that you have RealURL or CoolURI installed. We recommend to have the proper rewriting of a .xml ending in your .htaccess file. Also, make sure to uninstall metatags and any googlesitemap extension.

Sponsors

You may sponsor further development of this extension by contacting the author of this document.

Users Manual

The installation

Make sure that either RealURL (realurl) or CoolURI (cooluri) is installed. Then install the extension “seo_basics” through the Extension Manager (EM).

The static TypoScript

Static TypoScript will be added automatically to the root of your website. It will set the titletag, and add the keywords, description and date metatags.

Screenshot #1:

Select the template module

Select the root page of your website

Edit the whole sys_template TypoScript record

Screenshot #2:

Select the tab “Includes”

Add the element “Metatags and XML Sitemap (seo_basics)” to the list of included static templates from extensions.

Save the template.

Configuration

You can set an extra static content for your title tag (e.g. site title) or site-specific keywords or description additions to your tags by using the Constant Editor (found under module “Web” => “Template”). Use the wrap as usual (| divides between the prepended static text and the appended static text).

It also adds the xmlsitemap configuration. If you name your main PAGE object different than “page”, then you have to add an extra line to your TS setup. if your PAGE object is called “seite”, you have to add it like this:

seite.headerData.776 < plugin.tx_seobasics

The new DB fields

Two new fields “title tag” and “canonical tag” are added to the pages DB table and to the pages translations DB table. They can be edited through the page properties.

The canonical tag

The canonical tag is a feature to detect under which URL the page is uniquely identified in order to avoid duplicate content. Use wikipedia or google or anything to search for the functionality on what it does. If you don't know what it does, you should disable it through the constant editor. By default, the canonical tag feature of SEO basics takes the URL of the current page and automatically adds it inside the <head> tag. However, you can override it manually for each page and page language by editing the page properties of a page.

plugin.tx_seobasics.60.cObject.useDomain = www.b13.de

# use the current domain for the canonical tag.

plugin.tx_seobasics.60.cObject.useDomain = current

The new submodule

As seen on the first screenshot of the previous page, if you select “Web” => “Info” => “SEO Management” you have a nice overview of all SEO related fields of all pages. You can now hide special pages that usually don't need metatags or special pagetitle-tags. If you want to edit something, click on “Edit SEO fields”. Your fields should be colored. The input fields with colored background means the following:

green: Your field contains exactly enough information for search engines to display (e.g. without dots), and enough keywords. Make sure to divide your keywords with commas.

yellow: Your field contains some information but there is room for more – you should use it, shouldn't you... for your own sake.

red: This is too much. Search engines won't use / display all information in that field but only the first parts of it.

white: There is nothing in it.

The XML sitemap

The XML output for the sitemap is automatically added as a new pagetype (type 776). It should work out of the box when going on www.your-typo3-website.com/sitemap.xml - you can then go to Google Webmaster Tools (and all the others) to register that sitemap. The XML sitemap only works if your .htaccess file also redirects all *xml files to your index.php. You can disable this feature in the extension configuration page.

If you have RealURL installed, you don't have to do anything else, as everything is configured properly. If you have CoolURI installed, make sure that the sitemap.xml is mapped to pagetype 776 and it should work fine. Here are some instructions.

Also, since seo_basics 0.8.0, there is an option to always use the current domain. This is useful if you have proper domain settings in a multidomain-setup to use multiple domains. You can configure any domain to be used as prefix, or set it to “current” and then the current domain that is used when requesting the sitemap is used.

# use my own domain

tx_seo_xmlsitemaps.10.useDomain = www.b13.de

# use the domain of the current HTTP request

tx_seo_xmlsitemaps.10.useDomain = current

CoolURI Instructions

You can add the mapping in your CoolURI configuration XML as a value map like this:

<valuemap>
<parameter>type</parameter>
<value key="sitemap.xml">776</value>
</valuemap>

If you now enter www.your-typo3-website.com/sitemap.xml and it still shows up as a “Page not found” error, go to the CoolURI module in the Backend and select “New Link”. Enter the following information there:

URI:	sitemap.xml
Parameters:	type=776
Sticky:	select this checkbox

If you use CoolURI in a multidomain environment, make sure to use www.your-typo3-website.com@sitemap.xml for every domain and subdomain entry.

The HTML source indenter

The HTML source indention works out of the box. There is also nothing to configure. It's not the best but quite good. Any suggestions are more than welcome. You can disable this feature in the extension configuration page.

To-Do List

Right now we know to fix these things:

Update the SYS_LASTMODIFIED db field when changing keywords, pagetitle or description.

Set up backend submodule for translations.

Change Log

Version:	Changes:
0.3	Initial release
0.5	* BE module: Fixed multilanguage problems * BE module: Options are now saved in session * HTML source formatter: Fixed problems with line breaks and indention (no indention allowed) * Meta-Tags: Are only added if there is content in it * Meta-Tags: Possibility to add static parts to the tags before and after through TS constants * Install-time options to disable the output formatter and/or the google sitemap
0.5.1	* Syntax highlighting in BE module is working again * Meta-Tags also work if only constants are defined * also: Constants are noTrimWraps from now on.
0.5.2	* Manual: Added help for coolURI (thanks to Jan Bednarik) * BE: When editing pagetype "shortcut", description & keywords are shown too now * BE module: Fixed error when in multilang mode * BE module: Fixed coloring in keywords
0.5.3	* TCA: Added TCA array for tx_seo_titletag field in the pages overlay * Manual: Added help for coolURI (thanks to Jan Bednarik and CryAngel) * BE: When editing pagetype "shortcut", description & keywords are shown too now * BE module: Fixed error when in multilang mode * BE module: Fixed coloring in keywords
0.5.4	* Configuration: Fixed problem showing default titletags for multilanguage sites (Thanks to Andreas Kostner) * Sitemap: Added redirect so only main /sitemap.xml URLs are valid now, others are redirected to this one, must be enabled * Sitemap: Fixed small issue when pagetype of root was shortcut and shortcut_mode was selected (Thanks to Roman Buechler) * Source Formatter: Only active with pagetype 0
0.5.5	* Sitemap: Fixed bug with missing ending brace
0.5.6	* Sitemap: Fixed problem with absolute external URLs without prefix * Sitemap: Fixed problem with baseURLs, domain records and absRefPrefix, all possible now * TCA order: Now compatible with 4.2
0.6.0	* Sitemap: Links are now generated by typolink (better for coolURI) * Sitemap: Only generates non-hidden pages now (taking starttime and endttime into account) Thanks to Morten Kjems * Sitemap: Does not include pages that have the option "no_search" in the page properties checked * Added TypoScript Constant: Append the sitetitle defined in the sys_template ("on" by default!) * TypoScript: All wrap constants can now be filled with getData fields * TypoScript: All values are HSCed now * BE Module: Removed code dependencies on realurl (thanks to Masi)
0.7.0	* Breaking change: The seo_basics metatags and sitemap TypoScript is now in a static_template and needs to be added manually through Web=>Template=>Edit the whole template record! (Thanks to Michael Cannon) * TYPO3 4.3: Title-Tag is now found in the tab "Metadata" on each page * Title-Tag: Changed titletag DB field from varchar() to tinytext (Thanks to Michael Cannon) * Title-Tag: Changed titletag maximum length to 70 characters (Thanks to Michael Cannon) * Title-Tag / Keyword module: Changed coloring of keywords (less than 3 keywords make it yellow) (Thanks to Michael Cannon) * Source formatter: Fixed indention when having textarea elements on a page (Thanks to Sven Burkert for reporting this issue) * Sitemap: Fixed validation error when using tidy or source formatters (Thanks to Andreas Dörler for reporting this issue) * Sitemap: Fixed compatibility issue with RealURL when having domain string pointers in a configuration (Thanks to Steffen Gebert and Ingmar Schlecht)
0.8.0	* Canonical tag: Added new functionality, a new constant to deactivate the feature * Canonical tag: Fixed mulitdomain setup, added new option “useDomain”. * Sitemap: Fixed multidomain setup, added new option “useDomain”. * Manual updated

Credits

Thanks to EDV-Sachverständigenbüro Weißleder Stuttgart (www.weissleder.de) and mediales. Internetstrategien (www.mediales.com) for sponsoring the initial development of this extension.

Thanks to “b:dreizehn” and its clients to sponsor the further development of this extension.

Thanks to the TYPO3 community for giving feedback on the extension.

Thanks to Jesus Christ who gave me the power and energy to live and therefore to write this extension.

EXT: Basic SEO Features - 2

EXT: Basic SEO Features

Kasper Skårhøj

2002-11-01T00:32:00

Benjamin Mack

Kasper Skårhøj