Jump to content

Duplicate Titles


Dario

Recommended Posts

Hello,

I am doing tasks to improve the indexing of whmcs in search engines.

When I look at the source code of my pages, I can see that the title tag appears duplicated, the first title is correct, according to the configuration set in the lang/overrides/english.php file, but the second one appears as the name of the page , in this case: Homepage

How to prevent the title tag from appearing duplicate?

header.tpl

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Quality of Web Services</title>
<meta name="keywords" content="web hosting, domain names" />
<meta name="description" content="Web Services from people to the world" />

<title>Homepage</title>

<!-- Styling -->
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600|Raleway:400,700" rel="stylesheet">
<link href="/templates/six/css/all.min.css?v=cc3457" rel="stylesheet">
<link href="/assets/css/fontawesome-all.min.css" rel="stylesheet">
<link href="/templates/six/css/custom.css" rel="stylesheet">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->

/lang/overrides/english.php

$_LANG['title_homepage'] = "Quality of Web Services";
$_LANG['meta_description_homepage'] = "Web Services from people to the world";
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Hi there,

The title you see, meta keywords and meta description, was added by me manually in: /lang/overrides/english.php
since whmcs, by default it only adds <title>Homepage</title>, as you see in my description above and that is what I don't want to appear: <title>Homepage</title> because it is already customized by me.

Link to comment
Share on other sites

Hi,

Test this code here, since you can't have two titles and I didn't see a translation in that:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>{$_LANG.title_homepage}</title>
<meta name="keywords" content="{$_LANG.title_keywords}" />
<meta name="description" content="{$_LANG.meta_description_homepage}" />

<!-- Styling -->
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600|Raleway:400,700" rel="stylesheet">
<link href="/templates/six/css/all.min.css?v=cc3457" rel="stylesheet">
<link href="/assets/css/fontawesome-all.min.css" rel="stylesheet">
<link href="/templates/six/css/custom.css" rel="stylesheet">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->

If this still doesn't work, maybe you have some Hook or Addon, add that title element because WHMCS itself doesn't add it.

Link to comment
Share on other sites

The first title comes from your $_LANG while the second, judging from its particular location, should come from {$headoutput}. In this variable WHMCS puts all content returned in ClientAreaHeadOutput. In other word on your system there is probably an action hook responsibile for title duplication. You should look inside includes/hooks and also make sure no module is returning title tag via action hook.

p.s. My 2 cent. Don't waste time with SEO in WHMCS. It is not worth the effort. Real-life improvements are laughable and non-existent. All you get in return is probably a SEO tool that scores you higher and higher but this doesn't automatically translate into better indexing. You need way more than just a titles and meta tags to get something relevant not to mention WHMCS multi-language is session-based hence search engines will never index you site in other languages. Lastly what's the point of crafting titles and metas when WHMCS is a generator of duplicate contents?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated