Copy link to clipboard
Copied
Hello again.
I am using server side includes for the header and footer in Dreamweaver. I am using Bootstrap 4. header.shtml and footer.shtml.
Many SEO techniques have changed in the past several years when I was designing - been out of the loop for 6 years.
If I use a SSI header and include the proper meta data will the search engines pick up on them? Title and description, etc.
Also when I build each page I am thinking I should leave all the <head></head> data out as it will be inserted from the header.shtml file.
Am I correct?
If anyone has an idea of where I can find new pertainent info on SEO now that would really help me. I have found some but thought I would ask all of you as well as many of you have been using it recently.
As usual, thanks for all of your help.
Server-side includes are meant for the inclusion of generic information which is shared between pages, i.e, navigation, footer, perhaps a sidebar, news carousel - widgets, etc. They are not meant for page 'description', 'title' tags etc, as that information you will most likely want to change based on the main content information on the individual pages.
As regards to SEO and SSIs - it make no difference if the page is manually hard-coded or dynamically coded using SSIs - a search bot will still
...Osgood is correct. SSI or manually coded has no impact on SEO either way.
That said, unique page titles and descriptions are a must have. Do not put those inside your server-side includes.
Meta keywords are ignored by major search engines. What matters most is good semantic markup (h1, h2, h3, p) inside the document's <body> tag. That's what search engines index.
Read Google's SEO Starter Guide for reference.
https://developers.google.com/search/docs/beginner/seo-starter-guide
Copy link to clipboard
Copied
Server-side includes are meant for the inclusion of generic information which is shared between pages, i.e, navigation, footer, perhaps a sidebar, news carousel - widgets, etc. They are not meant for page 'description', 'title' tags etc, as that information you will most likely want to change based on the main content information on the individual pages.
As regards to SEO and SSIs - it make no difference if the page is manually hard-coded or dynamically coded using SSIs - a search bot will still be able to access the information.
Copy link to clipboard
Copied
Osgood is correct. SSI or manually coded has no impact on SEO either way.
That said, unique page titles and descriptions are a must have. Do not put those inside your server-side includes.
Meta keywords are ignored by major search engines. What matters most is good semantic markup (h1, h2, h3, p) inside the document's <body> tag. That's what search engines index.
Read Google's SEO Starter Guide for reference.
https://developers.google.com/search/docs/beginner/seo-starter-guide
Copy link to clipboard
Copied
Also don't confuse your page <header> with the document's <head> tag. They are NOT the same thing. Metadata goes inside the <head>, not the <header>.
Copy link to clipboard
Copied
I thank both of you for your guidance.
I understand what you are stating.
So the ssi doc that is the header should only have the navbar bootstrap code and the bootstrap css and what I am calling main css attached to it.
I am now reading up on on the link you sent Nancy. Thanks.
Copy link to clipboard
Copied
I am just naming the ssi file header.shtml. I know that is different from the <head> of the doc. Thanks for clarifying though.
Copy link to clipboard
Copied
"So the ssi file that is the header should only have the navbar bootstrap code and the bootstrap css and what I am calling main css attached to it."
No. ALL stylesheets go inside the <head> tag of the parent document.
SSIs are for code snippets only like your repeating <header>, <nav> and <footer>.
ANATOMY OF THE HTML5 DOCUMENT:
===============================
<!doctype html>
<html lang="en">
<head>
<title>Unique Page Title</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Unique page description here..."">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/custom.css">
<style>
//**embedded CSS for page specific styles if needed**/
</style>
<head>
<body>
<header>INSERT HEADER INCLUDE</header>
<nav>INSERT NAV INCLUDE</nav>
<main>Page content</main>
<aside>Sidebar content</aside>
<footer>INSERT FOOTER INCLUDE</footer>
</body>
</html>
Copy link to clipboard
Copied
I get it. That makes sense as the header.shtml ssi will pull from the head of whatever document it is called from. Thanks.
Copy link to clipboard
Copied
Actually, I think I am doing this the wrong way.
I did not make a code snippet. I created an html file that contains the navigation for the entire website. I named it header.shtml. I was going to use an include command to pull the navigation from the server.
I am not familiar with
<header>INSERT HEADER INCLUDE</header>
<nav>INSERT NAV INCLUDE</nav>
I am unsure of code snippets. Guess I will have to learn about them as I am guessing this is the best way to pull the navbar into each page? Thanks.
Copy link to clipboard
Copied
INSERT INCLUDE was for illustrative purposes only. It's not real code.
PHP include statment:
<?php require_once('includes/nav.html'); ?>
ASP or SHTML include statement:
<!--#include virtual="includes/nav.html -->
Markup in nav.html
<nav class="navbar fixed-top navbar-expand-md navbar-dark bg-primary ">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample08" aria-controls="navbarsExample08" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button>
<div class="collapse navbar-collapse justify-content-md-center" id="navbarsExample08">
<ul class="navbar-nav">
<li class="nav-item active"> <a class="nav-link" href="#">Centered nav only <span class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link" href="#">Link</a> </li>
<li class="nav-item"> <a class="nav-link disabled" href="#">Disabled</a> </li>
<li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="https://example.com" id="dropdown08" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu" aria-labelledby="dropdown08"> <a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> <a class="dropdown-item" href="#">Something else here</a> </div>
</li>
</ul>
</div>
</nav>
Copy link to clipboard
Copied
Yep. I am using
<!--#include virtual="includes/nav.html -->
Thanks so much for your time. I appreciate it.