Hide pages from Google - google-index

I am working on an application that allows users to create their profiles. As of now all profiles are public and appear in any Search Engine's search results.
We now need to let the user decide if his/her profile would be hidden or visible to various Search Engines. I am unable to figure how can I do this.
I cannot use the robots.txt as it would block all profiles.
Can anyone please help? Thanks in advance.
Regards,
Shardul.

A bit of hack and assuming that the URL is unique (ignoring QueryString etc), but if the URL is unique you could always do this via a Meta tag
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
Then, on your page, an if else statement to either display this (or not).
So, pseudo code would be (within the <head> of your HTML page)
if (userProfile != "public")
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
Of course, this only works if the robots obey these rules but I believe Google does!

Related

Braintree dropin ui showing junk characters insted of bullet mark in card number

Well, I am not able to find the answer anywhere for this.
So i am creating a client token with customer id to show already used payment methods in dropin ui. But instead of showing the card numbers like this
its showing me like this.
Anyone facing this issue? Any solution?
It looks like your Drop-in UI is trying to render the dots in the credit card number placeholder, but the page isn't accepting UTF-8 characters. This problem should be resolved if you add <meta charset="utf-8"> in your <head> tag.
Alternatively, you can include the UTF-8 charset in your Drop-in UI script tag. As an example, it would look something like this:
<script charset="UTF-8" src="https://js.braintreegateway.com/web/dropin/1.12.0/js/dropin.min.js"></script>

Google search result has wrong description

my page has set description in meta like this
<meta name="description" content="My best website"/>
Until now this description was displayed with my page in google search result. Now there is totally different text from footer in my page.
Can I change it somehow to be like before?
resubmit your page (via sitemap etc) to google webmaster. Also check that content of your description tag appears on your page, Google may perhaps think that your description tag is irrelivent to your actual page content text and therefore will ignore it and just take stuff from the page itself.

How find and change the name of a website (not url & domain name)

I woud like to know which information refers to the name of a website on Google Searchs (or any other Search's motors)
In exemple an url could be :
my-creations.com
and the google name (clic link):
"My Super Creations"
Is this name (My super creation) whritten in html -> meta ? how can i change it ? If i change it, my SEO result will be lower ?
Thanks for your responses and help :)
And excuse my english
<div id="thanks"></div>
Search engines usually use the value of the title element:
<head>
<title>Page and site name</title>
</head>
Some search engines, for example Google, might display something else when they think it’s more relevant.
The site web i'm working for use Adobe Muse (yep i know...). So the html is generated and here is the title :
<title>home</title>
And as you can imagine "home" is not the name of the website as result on google.
So.... anyone knows if Adobe Muse put another information anywhere ?

How to declare an images licence on a web page

Google Image Search can also filter for re-use licences of the images. I'm wondering how they know which licence an image is published under. How can I declare that licence on my website? Is it possible to declare a licence for each image on the page, or only for the entire page including all referenced images (possibly including pre-fetched content)? And what are the licences that Google understands and can classify to their filter?
I've searched around for a while and have finally found a solution, thanks to Creative Commons. In short, for Google (and other search engines) to know what license the content on a specific page is under, you have to tell it.
This is done the same way as you give Google other data like page relationships - using the HTML structure of the page. In this case, you use the rel attribute of a tags. To declare a single-page license:
License
Of course you can change the link text to whatever, but the important bit is the rel attribute. The href should point to the license itself.
I don't know how Google knows what license it is, but that's how you declare it, and Google's robots will do the magic for you. In terms of bulk licensing, I dare say you could preprocess pages with PHP (possibly in conjunction with an SQL database) to insert this license tag.
Sources:
Creative Commons Licence Chooser;
MicroFormats' RelLicense
You can also have a look at Sitepoint's definition of the rel attribute and its uses.
Hope this helps.
In this answer, I am assuming that:
You have a collection of images licensed under, say, a Creative Commons license.
You want image search engines to return your images when the user is filtering for Creative Commons-like images.
Creating metadata HTML pages
I think the best way to attach licensing information to an image is to create a canonical HTML page corresponding to each image--much like how Wikipedia or Flickr does it.
Let's say that we want to license a gallery of images under CC BY-SA 3.0 where every image has a URL of the format https://example.com/img1.jpg.
In that case, we embed the licensing information in HTML pages with URLs that look like https://example.com/img1.jpg.html.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Viewing img1.jpg</title>
<meta property="og:image" content="https://example.com/img1.jpg" />
<link rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/"/>
<link rel="canonical" href="https://example.com/img1.jpg.html"/>
</head>
<body>
<div>
<img src="https://example.com/img1.jpg" />
<small>
This image is licensed under a
<a rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/">Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)</a> license
</small>
</div>
</body>
</html>
Using schema.org metadata
We can also schema.org ImageObject metadata to our metadata pages--encoding our metadata as microdata, RDFa, or JSON-LD. The schema.org markup makes it possible to add additional annotations that describe the copyright holder and how to obtain a license to use the image.
Here is an example of a JSON-LD document that you can put inside the <head> tags.
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "ImageObject",
"author": "Bob Smith",
"copyrightHolder": "Bob Smith's employer",
"copyrightYear": 2021,
"contentUrl": "https://example.com/img1.jpg",
"license": "https://creativecommons.org/licenses/by-sa/3.0/",
"acquireLicensePage": "https://example.com/img1.jpg.html"
}
</script>
Exposing your metadata HTML pages to search engines
Finally, you should make it easy for crawlers to find these HTML pages. You can organically pepper in links to these HTML pages whenever you embed one of your images. Alternatively, you could just list all of your HTML pages with the Sitemap Protocol.

Meta keywords before doctype declaration?

I recently was browsing a local web design firm's portfolio and found all their sites' code begins as such:
<meta name="keywords" content="a whole bunch of keywords for their site">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
...
I was able to determine that the pages were generated by dreamweaver (at least in part).
Did dreamweaver do this, or did their "developer" just paste the code at the top of the document.
It is my impulse that this is bad practice and it might work incorrectly on some platforms but it got me wondering as to whether or not their may be a reason for this?
That is a terrible practice and invalid HTML. I bet that this would throw IE directly into quirks mode.
But as for your question, either the developer is a script kiddie and shoved the <meta> tag in there with little knowledge of the outcomes, or Dreamweaver did it. I hope it was Dreamweaver...
FYI - just had this issue and Dreamweaver does not put the meta tags in the correct position automatically. Cursor must be placed beforehand into an editable region.

Resources