How best to add differing titles and meta descriptions


#1

Hi, hope this is the right area, its kind of overlap between HTML/CSS and Marketing, but as its mainly about SEO I thought I would post it in marketing.

my website www.ybmortgages.co.uk is mostly optonised in that i have registered it with many relevant directories for local listings, have full title and meta descripts, 39 pages of good informative content and a sitemap submitted to google.

However, the way I built it through ASP was to have a header page which contacted the head info, and opening body tag and the menu structure. A footer page that has the footer, social media, contact links and disclaimers and the closing body and html tags etc.

Then for every page I create, I include the header, then write the content, and then include the footer. This was so if I wanted to update my menu/logo or such i only have to edit 1 page, and if I needed to change any footer info again only 1 page. It kept all the coding clean and simple, so seemed logical.

Now I have discovered 1 drawback. As I have the same header for each page, they therefore all have the same main title and meta description. Which aside from not making them relevant to a crawler, and looking bad on my HTML sitemap, I hear duplicating this can be detrimental to pageranking as google doesnt approve of it.

Given the structure of my page set up, How can I resolve? I cannot open another HEAD section within the content page, and move the title down and make it unique as the page can have only 1 head element right?

maybe i can add some ASP code with some IF statements based on the URL of the page, and then input the relevant HTML for the right title and description for that page?

any thoughts on best and simplest way to achieve this without changing whole structure of my website would be great.

thanks in advance.

Have uploaded example page, header and footer code and CSS incase you need it, but CSS not really relevant here.
footer.pdf (122.1 KB)
header.pdf (118.5 KB)
prodtrans.pdf (109.5 KB)


#2

From Digital Marketing point of view, It is one of the important to add different meta tags for every individual page.Add different titles & descriptions for every different page.
Give a description & titles relaed to your pages content otherwise search engine will avoid your pages.Make your page's content unique and make effective use of your keywords.


#3

thanks Alex for your reply, am fully aware of the importance, but need assistance in how best to achieve it given my website design.


#4

I don't know ASP, I use PHP on the server-side, but the same principles probably apply.
I use a template for the html page to maintain the same basic structure and remove code duplication.
Within the page template, any content that differs from page to page comes from echoing or including variables that have been pre-defined in the driver script.
Where the variable values come from is up to you, they may be hard coded into the script or pulled from a database.
So as a simplified example a template may be like:-

<!DOCTYPE html>
<html lang="en-gb">
    <head>
        <link rel="stylesheet" type="text/css" href="css/style.css">
        <title><?php $thispage->output('title') ?></title>
        <meta name="description" content="<?php $thispage->output('descr') ?>">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name=viewport content="width=device-width, initial-scale=1">
        <link rel="canonical" href="<?php $thispage->output('cano') ?>">
	<?php if(!$thispage->follow) : ?>
	<meta name="robots" content="nofollow, noarchive, noindex">
	<?php endif ?>
    </head>
    <body>
        <div class="page">
            <header>
                <img src="images/logo.svg" alt="Logo">
            </header>
            <nav class="mainmen">
                <ul>
                    <?php $thispage->menu->output() ?>
                </ul>
            </nav>
		<aside>
			Sidebar content
		</aside>
		<main>
			<h1><?php $thispage->output('h1') ?></h1>
			<?php include_once $thispage->content ?>
		</main>
            <footer>
                Footer content
            </footer>
        </div>
    </body>
</html>

It's a bit non-standard, as I'm using my own custom output() OOP method in place of the standard php echo, but it could just as well be a plain echo.
But for the main page content I use an include because that's a whole block of html with possibly more php snippets rather than a simple string like the title and description.
Maybe this will give you some ideas how it can be done with ASP.


#5

it does thanks, think hard coding it probably easier than linking to a database just for titles and descriptions, but will get coding the ASP part of it to dynamically create them based on the page, thanks for confirming thats how you do it in PHP, as they are very similar logically!

many thanks SamA74!


#7

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.