Prevent HTML page indexing by search engines [duplicate] - html

This question already has answers here:
What do I do if I don't want my website to be indexed by search engines?
(3 answers)
Closed last year.
In my website i have a page where i put just some "Text datas" and i use it as an simple database.
to be more clear it's a Quotes with their author name (i.e. :
<div id="QUO12012022">
<h1>Author NAME</h1>
<span>QUOTE TEXT</span>
</div>
an so on, and in my mainpage a script load each day the quote and display it in the main page.
While testing and searching google directly with my website name, it loaded in the result a direct link to this data page,
My question obviously is how to make this page just invisible to search engine and still be able to load data from it in my internal script, ?
PS : since it's simple exercice and as i am still beginner, i don't want to use sql database, just simple text stuff like this.
Thanks.

To prevent most search engine web crawlers from indexing a page on your site, place the following meta tag into the section of your page:
<meta name="robots" content="noindex">
To prevent only Google web crawlers from indexing a page:
<meta name="googlebot" content="noindex">

Related

How do I make a "global" <head> tag in VSCode?

I have a project that is ~25 HTML pages I've made "by hand"; this project is too small to have some sort of "site builder" to pull things from different sources and to build a page automatically/as-needed (that is also way out of my skillset, as you can probably tell by my lack of precise language).
I have Emmet abbreviations set up so I can type ! and it'll pre-populate the HTML file with custom things for this specific project, which is mostly content in the <head> tag. But sometimes I want to update what's in the <head> tag for all of my pages.
A recent example was adding Google Analytics tracking, which requires you to put 2 <script> tags in the <head> tag for every page in the site. So I manually copy/pasted it into each page.
I feel like there has to be a way where I update the <head> tag in one location and it'll be synced across all of my HTML pages. I could update the Emmet abbreviation template thing, but I would still have to go to every single page and update it. I have tried Googling this, looked here, looked at VSCode documentation and haven't seen anything. But I do feel like this has to exist, somehow, maybe in a VSCode extension somewhere or a project setting that I'm just not aware of and I don't know the right words to use to Google the answer myself.

How to redirect someone automatically within given time using only HTML/CSS excluding JS or <meta>

I was looking at how i can redirect a viewer on a website to another part of the website with in given time but all i found is that i can do it only with JavaScript or using this code, <meta http-equiv="refresh" content="3; url='https://www.google.com'" /> so is there a way to do this using only HTML/CSS
You won't be able to do that using only Html or Css since you need a script that can treat time.
If the reason why you don't want to use JS is due to the "difficulty", trust me it's very simple, many tutorials are available on YouTube for example.

A few questions about how a Wordpress site is displayed in search engine results

I have unchecked the box that says "discourage search engines" that I used when building my Wordpress website.
Since then, Google search results have stopped displaying a message that a description was not available because of my robots.txt file, but I'm a little confused at the results since it has started displaying the details of my website.
I want to get this right as soon as I can, because I know that Google can take a long time to update its search results.
So first of all, I've filled out the two fields in the Wordpress options as follows:
I have noticed that different browsers display the results differently, sometimes even the same browser on a different device like a mobile phone.
These are two of the results I'm getting:
On Google search (mobile phone)
This just pulls in all of the menu hyperlinks rather than adding the description I've written.
On Yahoo search
The Yahoo result takes the description / bio from the about page, rather than using the one I've written in the box in the Wordpress settings.
I was under the impression that search engines break up the info given in Wordpress as shown in the diagram below. I'm not sure why there is so much variation in the different browsers / devices.
So I'm wondering the following –
1) Have I got the right idea regarding the way these Wordpress option fields should be displayed in Google search results?
2) If I have, then why might they not be displaying correctly? It's been over a week since I updated them to how they are written in my screenshot of the General Settings fields below.
3) If I were to leave these fields blank, would my meta tags in my <head>
take care of these instead? By these I mean –
<title><?php bloginfo('name'); ?></title>
and <meta name="description" content="description goes in here..." />
When I googled the name I was shown the About-section.
Google (and other search engines, but especially Google) wants to show relevant information to the user. Not what you want the user to see, but what might be usefull for the user, related to his search term and probably previous searches as well.
When someone is searching for the name of this person they probably want to know something about this person so I guess that is why Google is displaying the About-section. Or the user might want to see what is available on the site, that is why all the navigation links are shown in other cases.
Adding <meta name="description" content="<?php echo get_bloginfo('description') ?>" /> might help you, but it probably will not be shown for each and every user. The search engine is always free to ignore that.

Display permanent link in search engines

I am doing pretty basic thing here.
Showing some posts on a page. Each post is inside a div and has an anchor tag showing its permanent url
for example
<div>
<a href='permanent_link_url'>permalink </a>
Summary of the Post
</div>
Now when I am trying to search for a post on popular search engines, they are not displaying the permanent link that I have included in the div, so rather than redirecting me to the permanent link of the post, its redirecting me to the home page of the website
Any suggestions on what should be done here to overcome this issue
You may want to look at the canonical link standard to help you out here. I'm assuming the permalink actually works as a URL and that it is on the same website.
So for your example, I would include some HTML in the <head> section of the page that has:
<link rel="canonical" href="the_permanent_link"/>
so that you can instruct the search engines that this is in fact the best link to the content in question. Where possible, you should also correct your "old" links to the canonical link. You may also want to send sitemaps to the popular browsers as a best practice.

Internal Page Links vs Different Page via HTML [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Does Google ignores whatever is after the hash fragment (#) while crawling our website?
I have a question regarding links to a different section of the same page vs linking to a new page. For example:
domain.com/about.php
domain.com/history.php
domain.com/team.php
vs.
domain.com/about.php
domain.com/about.php#history
domain.com/about.php#team
I am wondering if Google recognizes the 2nd set of links and indexes those pages separately? Or if just the about.php page is indexed? Ideally I will remove the .php extension in nginx config.
thanks.
All search engines copies all the texts of your page. If you program server side on PHP, JSP, or HTML, the texts are all being taken by the search engine. If you are going to put an anchor link and it scrolls down to the section you want, it still works. It is being recorded as one page, in this case about.php.
But, if you start using javascript, and the text that you have is part of javascript, and not the server side scripts; then, search engines may not be able to read it because it only reads the text that are ready on load. For example:
document.write("This text will not be read by Search Engines");
So, if you are going to program your page, it is recommended to display the text first using server side scripting. If you ever want to hide the texts, you may use page effects after the server loads the texts, and it still will be read by the Search Engines.