Hi all, I do not intend to spam the SE's but my site has a row of link buttons along the top and the bottom. Register, profile, members, blah, blah

I just did a search engine simulation and the text for these was right at the beginning of the page. These have no relevance to my page content and therefore dilute the copy optimisation.

Is there any way that I can tell a spider to stay away from a block of code?
Maybe put it in a different page and use an include statement?? Can you stop an SE following an include statement??

Any ideas guys?

Dani AI

Generated

Short answer for : you cannot tell a crawler to ignore a specific block inside the single HTML file the server returns. Robots meta tags and X-Robots HTTP headers apply to the whole resource, and server-side includes are merged before the page is served (so search engines see the final HTML). The reliable way to keep a chunk out of crawling/indexing is to put it on a separate URL and control that resource (robots.txt or a noindex on that resource) — but note the tradeoffs (blocked URLs can still be discovered, and client-side tricks are not a guaranteed shield because modern engines execute JavaScript).

If the goal is simply to stop "navigation" text from dominating perceived page copy, consider these practical, safe steps instead of hiding content:

  • Put the page's primary content earlier in the DOM so it carries semantic weight.
  • Use semantic elements (for example, nav and main) and concise link text to reduce noise.
  • Provide a skip-to-content link so keyboard users and screen readers can get straight to the main material.

Example structure to copy into templates:

<a href="#main" class="skip-link">Skip to content</a>

<nav aria-label="Main navigation"> ... </nav>

<main id="main"> ... page content ... </main>

Heed : hiding parts of pages hurts accessibility and can trigger spam/cloaking concerns. Prefer structural fixes and clear content hierarchy. For markup and accessibility patterns see MDN: nav element and .

Recommended Answers

All 6 Replies

You can use css to position both the top and bottom row of links, while keeping both at the bottom of the page in the source. It is not hard you just need some absolute positioning.

An other option would be to create the links with some javascript. The search engines do not read the javascript, most of the time, maby some only read some very basic js.

Don't change a thing. Whatever test you ran is a joke and you should ignore. Those links and their placement will not harm your site.

By changing your code to make it inaccessible to the search engines you are making inaccessible to some human beings. And you would be doing it for no gain.

Oh dear, now what??

Don't change anything. You're fine. That tool gave you bad information. Most SEO tools do that.

Don't change anything. You're fine. That tool gave you bad information. Most SEO tools do that.

Very true, and i agree with you on your previous post.
But it is possible to do and sometimes can be usefull to make stuff inaccesible.

Ok, I'm not going to risk changing anything. Thanks for your edvice guys.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.