Is there any way to add custom Canonical link, title, meta description and keywords with any addon in EE?
4 Answers
Take a look at SEO Lite http://devot-ee.com/add-ons/seolite
But really, you can just build this into your templates/field groups without the use of an add-on.
You don't need an add-on to do this. Just add those items to your templates. You have complete control over every piece of markup in ExpressionEngine, so when it comes to adding any markup to any page generated by EE, it is never a question of "is there a way".
If we could see how you've setup your templates (and know whether you're using shared bits of code for parts of your templates, etc), we could offer more advanced guidance, but to answer your question: yes, and here's the simplest example:
{exp:channel:entries channel="news" limit="1" require_entry="yes"}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="description" content="{news_description}" />
<link rel="canonical" href="{title_permalink="news/entry"}"/>
<title>{title}</title>
</head>
<body>
<h1>{title}</h1>
{news_entry}
</body>
</html>
{/exp:channel:entries}
-
I agree with Derek here. The only benefit an add-on gives (such as the one in my answer) is that you can create 'default' meta data and specify how any meta data is constructed 'on-the-fly'.– foamcowDec 2, 2013 at 9:39
ee-garage.com has an extremely complete addon >> nsm better meta.
Also, the keyword meta tag is no longer included in search engine bot data mining.
Good luck
I find this template code works well as a basic canonical link generator:
{if segment_3}
<link rel="canonical" href="{site_url}{segment_1}/{segment_2}/{segment_3}">
{if:elseif segment_2}
<link rel="canonical" href="{site_url}{segment_1}/{segment_2}">
{if:elseif segment_1 == "your-default-template-group"}
<link rel="canonical" href="{site_url}">
{if:else}
<link rel="canonical" href="{site_url}{segment_1}">
{/if}
- "your-default-template-group" segment_1 will be removed if home page
- expand to segment_4 etc if necessary
- add final trailing slashes if preferred