slman Posted June 10, 2020 Share Posted June 10, 2020 Hello! My WHMCS setup consists of two templates for two different languages, I did not do any SEO work (meta keywords and descriptions), Should I add the keywords and descriptions in EVERY page, for only in the index? Is there a hook that puts the keywords and descriptions in all pages? please dont suggest using modules, and I rather not edit template files, only use hooks if possible. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted June 10, 2020 Share Posted June 10, 2020 (edited) WHMCS multi-language is based on PHP sessions meaning that spiders/crawlers can "see" and index pages only in default language. That said, translating titles, meta descriptions and contents in multiple languages is a waste of time from an SEO perspective since search engines can't see translations. Yes, from time to time Google can index things like: index.php?language=arabic index.php?language=english index.php?language=italian But there's nothing to celebrate since they're still based on sessions hence duplicate content is just around the corner. Moreover WHMCS doesn't have any SEO enhancement so you have to implement them manually. 7 hours ago, slman said: Is there a hook that puts the keywords and descriptions in all pages? No no no no... 🥶 not keywords. This tag has been deprecated by all search engines more than a decade ago so don't waste time writing them. Anyone can write things like: Best hosting, top hosting, most powerful hosting, hosting for rich people, money, sex, tits, lady gaga naked, trump hairs, bitcoin, viagra, bungabunga berlusconi That's why keywords are no longer used. As for meta description, it is not a ranking factor. It's just a description that shows up in search results. It doesn't affect your rankings but just CTR since visitors are more inclined to click your link if there's a nice description. Anyway you can implement meta descriptions with an action hook (see below) but keep in mind that the only way to index multilingual pages is to use different URLs for each language like follows: example.com/hello example.de/hello it.example.com/ciao Canonical URLs are also needed to avoid duplicate content issues like these ones: example.com/hello example.com/HELLO example.com/hElLo Sadly WHMCS is a duplicate content generator ☹️ Edited June 10, 2020 by Kian 1 Quote Link to comment Share on other sites More sharing options...
slman Posted June 10, 2020 Author Share Posted June 10, 2020 9 hours ago, Kian said: WHMCS multi-language is based on PHP sessions meaning that spiders/crawlers can "see" and index pages only in default language. That said, translating titles, meta descriptions and contents in multiple languages is a waste of time from an SEO perspective since search engines can't see translations. Yes, from time to time Google can index things like: index.php?language=arabic index.php?language=english index.php?language=italian But there's nothing to celebrate since they're still based on sessions hence duplicate content is just around the corner. Moreover WHMCS doesn't have any SEO enhancement so you have to implement them manually. No no no no... 🥶 not keywords. This tag has been deprecated by all search engines more than a decade ago so don't waste time writing them. Anyone can write things like: Best hosting, top hosting, most powerful hosting, hosting for rich people, money, sex, tits, lady gaga naked, trump hairs, bitcoin, viagra, bungabunga berlusconi That's why keywords are no longer used. As for meta description, it is not a ranking factor. It's just a description that shows up in search results. It doesn't affect your rankings but just CTR since visitors are more inclined to click your link if there's a nice description. Anyway you can implement meta descriptions with an action hook (see below) but keep in mind that the only way to index multilingual pages is to use different URLs for each language like follows: example.com/hello example.de/hello it.example.com/ciao Canonical URLs are also needed to avoid duplicate content issues like these ones: example.com/hello example.com/HELLO example.com/hElLo Sadly WHMCS is a duplicate content generator ☹️ This is what I'm trying to achive, in the attachements. I could do one language only it will be fine. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted June 11, 2020 Share Posted June 11, 2020 For announcements you can use the hook I posted before. For other pages (index, about, clientarea, register, pwreset, supporttickets...) it's easier. Begin by creating meta descriptions in your language file like follows (use language overrides!): $_LANG['metadescription']['index'] = "We are the best hosting company"; $_LANG['metadescription']['clientarea'] = "Manage renewals, download invoices, submit tickets..."; $_LANG['metadescription']['register'] = "Register an account with us"; Use file names (index.php, clientarea.php, register.php...) as keys. Now open your templates/{YOUR_TEMPLATE}/includes/header.tpl and add the meta tag in your <head> tag. {if $LANG.metadescription[$filename]} <meta name="description" content="{$LANG.metadescription[$filename]}" /> {/if} Meta description automatically shows up if there's an available description for current page. 1 Quote Link to comment Share on other sites More sharing options...
slman Posted June 11, 2020 Author Share Posted June 11, 2020 6 minutes ago, Kian said: For announcements you can use the hook I posted before. For other pages (index, about, clientarea, register, pwreset, supporttickets...) it's easier. Begin by creating meta descriptions in your language file like follows (use language overrides!): $_LANG['metadescription']['index'] = "We are the best hosting company"; $_LANG['metadescription']['clientarea'] = "Manage renewals, download invoices, submit tickets..."; $_LANG['metadescription']['register'] = "Register an account with us"; Use file names (index.php, clientarea.php, register.php...) as keys. Now open your templates/{YOUR_TEMPLATE}/includes/header.tpl and add the meta tag in your <head> tag. {if $LANG.metadescription[$filename]} <meta name="description" content="{$LANG.metadescription[$filename]}" /> {/if} Meta description automatically shows up if there's an available description for current page. So, I would add the descriptions for each page in the lang, and put the code above only in the header.tpl file for the default template and language right? Should I add anything else than the description? What should the length of it be? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted June 11, 2020 Share Posted June 11, 2020 Up to 320 but never go lower than 160. Most importantly don't use the same description on multiple pages. Duplicates meta descriptions are bad. 0 Quote Link to comment Share on other sites More sharing options...
slman Posted June 11, 2020 Author Share Posted June 11, 2020 2 minutes ago, Kian said: Up to 320 but never go lower than 160. Most importantly don't use the same description on multiple pages. Duplicates meta descriptions are bad. Would I add anything other than the description? And which pages should i put them on? Only header.tpl? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted June 11, 2020 Share Posted June 11, 2020 You should also include the following OG tags: og:url - URL of current page og:type - usually "article" but look at docs for more details og:title - the same title you have inside <title></title> tags og:description - make it equal to standard meta description All the above tags are used when sharing links on social media. Sadly you can't add og:image since WHMCS doesn't support it. 0 Quote Link to comment Share on other sites More sharing options...
slman Posted June 11, 2020 Author Share Posted June 11, 2020 1 minute ago, Kian said: You should also include the following OG tags: og:url - URL of current page og:type - usually "article" but look at docs for more details og:title - the same title you have inside <title></title> tags og:description - make it equal to standard meta description All the above tags are used when sharing links on social media. Sadly you can't add og:image since WHMCS doesn't support it. If you're free, can you send me the code that I need to fill in please? thank you 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted June 11, 2020 Share Posted June 11, 2020 (edited) Same principle... {if $LANG.metadescription[$filename]} <meta name="description" content="{$LANG.metadescription[$filename]}" /> <meta property="og:description" content="{$LANG.metadescription[$filename]}" /> {/if} <meta property="og:url" content="{$systemurl}{$currentpagelinkback|replace:'|':''}" /> <meta property="og:type" content="article" /> <meta property="og:title" content="{$pagetitle}" /> Meta descriptions (OG & standard one) are basically the same thing. Title and type are nothing special. As for url, the {$systemurl}{$currentpagelinkback|replace:'|':''} combo should work but I didn't test it. Edited June 11, 2020 by Kian 1 Quote Link to comment Share on other sites More sharing options...
Jason Levine Posted June 6, 2022 Share Posted June 6, 2022 On 6/11/2020 at 3:54 PM, Kian said: Same principle... {if $LANG.metadescription[$filename]} <meta name="description" content="{$LANG.metadescription[$filename]}" /> <meta property="og:description" content="{$LANG.metadescription[$filename]}" /> {/if} <meta property="og:url" content="{$systemurl}{$currentpagelinkback|replace:'|':''}" /> <meta property="og:type" content="article" /> <meta property="og:title" content="{$pagetitle}" /> Meta descriptions (OG & standard one) are basically the same thing. Title and type are nothing special. As for url, the {$systemurl}{$currentpagelinkback|replace:'|':''} combo should work but I didn't test it. This would go in the head.tpl, right? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.