Project

General

Profile

Meta Tags & Titles

Added by James Rempel over 8 years ago

Is there a way to have different Meta Tags, such as content and keywords, as well as different titles set for each individual page?


Replies (1)

RE: Meta Tags & Titles - Added by Koen Deforche over 8 years ago

Hey,

You can use WApplication::setTitle() on each of your pages, and you can also use WApplication::addMetaHeader() on each of your pages.

The latter will only be visible to search bots (which get an plain HTML version of your 'page') to plain HTML browsers, unless you switch to 'progressive bootstrap' mode.

You may also need to get a better detection of search bots, e.g.:

       <user-agents type="bot">
            <user-agent>.*Googlebot.*</user-agent>
            <user-agent>.*msnbot.*</user-agent>
            <user-agent>.*Slurp.*</user-agent>
            <user-agent>.*Crawler.*</user-agent>
            <user-agent>.*Bot.*</user-agent>
            <user-agent>.*ia_archiver.*</user-agent>
            <user-agent>.*Twiceler.*</user-agent>
            <user-agent>.*Yandex.*</user-agent>
            <user-agent>.*Nutch.*</user-agent>
            <user-agent>.*MJ12bot.*</user-agent>
            <user-agent>.*Baiduspider.*</user-agent>
            <user-agent>.*Ezooms.*</user-agent>
            <user-agent>.*Sogou web spider.*</user-agent>
            <user-agent>.*AhrefsBot.*</user-agent>
        </user-agents>
    (1-1/1)