google search doesn't show correct title and description - web

Please search google for amirkabir data miners
Check Title and Description for https://adm-co.net
As you can see in page source, google show Amirkabir Data Miners: داده کاوان امیرکبیر instead of داده کاوان امیرکبیر | Amirkabir Data Miners and completely wrong description.
I registered site in Google Webmaster Tools, and Google Analytics and tried anything.
What do i have to do!?
<title>داده کاوان امیرکبیر | Amirkabir Data Miners</title>
<meta charset="utf-8" />
<link rel="apple-touch-icon" sizes="57x57" href="/Content/images/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="114x114" href="/Content/images/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="72x72" href="/Content/images/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="144x144" href="/Content/images/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="60x60" href="/Content/images/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="120x120" href="/Content/images/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="76x76" href="/Content/images/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="152x152" href="/Content/images/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/Content/images/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/Content/images/favicons/favicon-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/Content/images/favicons/favicon-160x160.png" sizes="160x160">
<link rel="icon" type="image/png" href="/Content/images/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/Content/images/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/Content/images/favicons/favicon-32x32.png" sizes="32x32">
<meta name="msapplication-TileColor" content="#e3e3e3">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="description" content="شرکت داده کاوان امیرکبیر | تولید کننده نرم افزارهای تحت وب، از قبیل حسابداری آنلاین 'کاج سیستم' ، سیستم مدیریت پروژه 'تسک من' و ...">
<meta name="keywords" content="شرکت داده کاوان امیرکبیر,شرکت,داده,کاوان,امیرکبیر,حسابداری, سیستم های تحت وب, برنامه نویسی,حسابداری آنلاین,سیستم های تحت وب, طراحی نرم افزار, adm, amikabir, data, miners, amirkabir data miners, adm (amirkabir data miners), programming, financial, taskman, taskmanager, web application, web, application">
<meta name="language" content="fa">
<meta name="robots" content="all" />
<meta name="rights" content="Copyright © 2015 ADM-CO - All rights reserved">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Many are getting similar kind of issues, Before Google has automatically set the Meta description when it is not presented in the site. It sets the description as per the search query and based on the content in the website.
Now the Google does the same for the Meta Title and Meta Description even though it is presented in the website.

Related

Having Whatsapp sharing url problem in Next js , i.e OpenGraph, Not showing or fetching data in whatsapp when using dynamic data

When I am using meta og tags in _app.js its work with static content,
but when I use it on other pages like index , its not showing anything in whatsapp sharing
_app.js
<Head>
<meta name="viewport" content="initial-scale=1, width=device-width" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<meta name="viewport" content="user-scalable=no" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta name="HandheldFriendly" content="true" />
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content={"https://connectme.co.in"} />
<meta property="og:image" content={"https://images.wsj.net/im-515021?width=860&height=573"} />
</Head>
its working here but in index page
its not working
index.js
<Head>
<meta property="og:title" content={profileData?.name} />
<meta property="og:image" content={profileData?.profileimg} />
<meta property="og:type" content="profile.image" />
<meta property="og:url" content={"https://connectme.co.in/"} />
</Head>
profileData is ny dynamic data
now its not working here ,
when i Checked in facebook debugger its showing this
Inferred Property
The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.

LinkedIn URL preview not working while sharing

I have created a simple Node.js web server to render html content on the browser. Specifically the html contains meta tags for sharing on social media to enable URL preview as soon as the website link is shared on social platforms like FB,Twitter,LinkedIn,etc.
I have already added open graph tags for sharing in the returned html content. It works well for FB and Twitter but gives an error with "We encountered a server error while trying to inspect the URL." as response.
Here is code of server with a dummy endpoint.
const express=require('express');
const app = express();
require('dotenv').config();
app.get('/dummy',(req,res)=>{
res.send(`
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dummy Endpoint</title>
<meta name="type" content="article" />
<meta name="title" content="Dummy Endpoint"/>
<meta name="description" content="Used for testing"/>
<meta name="image" content="https://www.kindpng.com/picc/m/252-2524695_dummy-profile-image-jpg-hd-png-download.png"/>
<meta property="og:type" content="article"/>
<meta property="og:title" content="Dummy endpoint"/>
<meta property="og:description" content="Used for testing"/>
<meta property="og:image" content="https://www.kindpng.com/picc/m/252-2524695_dummy-profile-image-jpg-hd-png-download.png"/>
<meta property="og:image:secure_url" content="https://www.kindpng.com/picc/m/252-2524695_dummy-profile-image-jpg-hd-png-download.png"/>
<meta property="og:image:secure" content="https://www.kindpng.com/picc/m/252-2524695_dummy-profile-image-jpg-hd-png-download.png"/>
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="450" />
<meta name="twitter:title" content="Dummy Endpoint"/>
<meta name="twitter:description" content="Dummy endpoint"/>
<meta name="twitter:image" content="https://www.kindpng.com/picc/m/252-2524695_dummy-profile-image-jpg-hd-png-download.png"/>
<meta name="twitter:card" content="summary"/>
`)
})
app.listen(process.env.PORT || 5000, () => {
console.log('Server started at '+process.env.PORT)
});
Website link : https://whispering-woodland-66525.herokuapp.com/dummy (Page is empty, check head section in Inspect)
Response of Facebook sharing debugger : https://developers.facebook.com/tools/debug/?q=http%3A%2F%2Fwhispering-woodland-66525.herokuapp.com%2Fdummy
Response of LinkedIn Post Inspector : https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fwhispering-woodland-66525.herokuapp.com%2Fdummy
I have tried out refreshing the Post Inspector page multiple time and adding a dummy query parameter to the the url in the Post Inspector to prevent serving of cached content, but things are not working out.
I am unable to understand if there is something wrong or missing in the code or is it a problem with LinkedIn web crawlers.
I believe LinkedIn Post Inspector is expecting a complete HTML document. Consider wrapping your metadata into the header of the document. Try returning:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dummy Endpoint</title>
<meta name="type" content="article" />
<meta name="title" content="Dummy Endpoint"/>
<meta name="description" content="Used for testing"/>
<meta name="image" content="https://www.kindpng.com/picc/m/252-2524695_dummy-profile-image-jpg-hd-png-download.png"/>
<meta property="og:type" content="article"/>
<meta property="og:title" content="Dummy endpoint"/>
<meta property="og:description" content="Used for testing"/>
<meta property="og:image" content="https://www.kindpng.com/picc/m/252-2524695_dummy-profile-image-jpg-hd-png-download.png"/>
<meta property="og:image:secure_url" content="https://www.kindpng.com/picc/m/252-2524695_dummy-profile-image-jpg-hd-png-download.png"/>
<meta property="og:image:secure" content="https://www.kindpng.com/picc/m/252-2524695_dummy-profile-image-jpg-hd-png-download.png"/>
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="450" />
<meta name="twitter:title" content="Dummy Endpoint"/>
<meta name="twitter:description" content="Dummy endpoint"/>
<meta name="twitter:image" content="https://www.kindpng.com/picc/m/252-2524695_dummy-profile-image-jpg-hd-png-download.png"/>
<meta name="twitter:card" content="summary"/>
</head>
</html>

EJS/Node/Express - Having a header partial, how to change title for each page?

I recently took a course on back-end web developing.
As the title says, I don't get how can I use a header partial for the whole website but have different titles for each page. (because is included in the tag)
Is there any trick?
1st) In your Express route:
app.get("/", function(req, res){
res.locals.title = "Abel's Home Page"; // THIS LINE IS KEY
res.render("home.ejs");
});
2nd) In your views/home.ejs file:
<% include partials/header.ejs %>
3rd) In your views/partials/header.ejs file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title><%= title %></title> <!-- THIS LINE IS KEY -->
<link rel="stylesheet" href="../style.css">
<link rel="shortcut icon" href="../logo_sm.png" type="image/x-icon">
</head>
<body>
Each page that includes the partial is free to pass data to said partial through parameters. See here for an example.

does multiple fav icon delay page loading?

in my web page , I am using more than 10 fav icons , as you can see bellow :
<link rel="apple-touch-icon" sizes="57x57" href="">
<link rel="apple-touch-icon" sizes="60x60" href="">
<link rel="apple-touch-icon" sizes="72x72" href="">
<link rel="apple-touch-icon" sizes="76x76" href="">
<link rel="apple-touch-icon" sizes="114x114" href="">
<link rel="apple-touch-icon" sizes="120x120" href="">
<link rel="apple-touch-icon" sizes="144x144" href="">
<link rel="apple-touch-icon" sizes="152x152" href="">
<link rel="apple-touch-icon" sizes="180x180" href="">
<link rel="icon" type="image/png" sizes="192x192" href="">
<link rel="icon" type="image/png" sizes="32x32" href="">
<link rel="icon" type="image/png" sizes="96x96" href="">
<link rel="icon" type="image/png" sizes="16x16" href="">
<link rel="manifest" href="">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="">
<meta name="theme-color" content="#ffffff">
Should this cause a web page delay ?
Thank you

Auto login Rocket.Chat with LDAP

I am integrating Rocket.Chat into my system that share user account through LDAP database. We created a shortcut to go Rocket.Chat from our system, when user click to this shortcut, our system will open Rocket.Chat page with url type: http://rocketchat.host:3000/?username={username}&password={password} with username and password is current account.
We changed something on compiled bundle of Rocket.Chat:
// Changed file: {bundle}\programs\web.browser\head.html
<title>Rocket.Chat</title>
<meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="expires" content="-1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="fragment" content="!" />
<meta name="distribution" content="global" />
<meta name="rating" content="general" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="msapplication-TileColor" content="#04436a">
<meta name="msapplication-TileImage" content="images/logo/mstile-144x144.png?v=3">
<meta name="msapplication-config" content="images/logo/browserconfig.xml?v=3">
<meta name="theme-color" content="#04436a">
<link rel="manifest" href="images/logo/manifest.json?v=3">
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/nocfbnnmjnndkbipkabodnheejiegccf">
<link rel="icon" sizes="any" type="image/svg+xml" href="assets/favicon.svg?v=3">
<link rel="icon" sizes="256x256" type="image/png" href="assets/favicon_256.png?v=3">
<link rel="icon" sizes="192x192" type="image/png" href="assets/favicon_192.png?v=3">
<link rel="icon" sizes="128x128" type="image/png" href="assets/favicon_128.png?v=3">
<link rel="icon" sizes="96x96" type="image/png" href="assets/favicon_96.png?v=3">
<link rel="icon" sizes="64x64" type="image/png" href="assets/favicon_64.png?v=3">
<link rel="shortcut icon" sizes="16x16 32x32 48x48" type="image/x-icon" href="assets/favicon_ico.ico?v=3" />
<link rel="apple-touch-icon" sizes="57x57" href="images/logo/apple-touch-icon-57x57.png?v=3">
<link rel="apple-touch-icon" sizes="60x60" href="images/logo/apple-touch-icon-60x60.png?v=3">
<link rel="apple-touch-icon" sizes="72x72" href="images/logo/apple-touch-icon-72x72.png?v=3">
<link rel="apple-touch-icon" sizes="76x76" href="images/logo/apple-touch-icon-76x76.png?v=3">
<link rel="apple-touch-icon" sizes="114x114" href="images/logo/apple-touch-icon-114x114.png?v=3">
<link rel="apple-touch-icon" sizes="120x120" href="images/logo/apple-touch-icon-120x120.png?v=3">
<link rel="apple-touch-icon" sizes="144x144" href="images/logo/apple-touch-icon-144x144.png?v=3">
<link rel="apple-touch-icon" sizes="152x152" href="images/logo/apple-touch-icon-152x152.png?v=3">
<link rel="apple-touch-icon" sizes="180x180" href="images/logo/apple-touch-icon-180x180.png?v=3">
<script type="text/javascript">
// alert("test js");
</script>
<script type="text/javascript">
function getURLParameter(name) {
console.log("location.search: " + location.search);
var result = decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
console.log("getURLParameter, " + name + ": " + result);
return result;
}
var username = getURLParameter('username'),
password = getURLParameter('password'); // Query parameter from url that our system passed
Meteor.loginWithPassword(username, password, function () {
console.log('loginWithPassword callback, username: ' + username + "; password:" + password);
}); // Call login direct to Meteor.login
// Query "username" and "password" input fields from login from then pass data and simulate click login button
document.addEventListener("DOMContentLoaded", function(event) {
document.getElementById('username').value = username;
document.getElementById('password').value = password;
document.getElementById('loginButton').click();
});
</script>
We also changed in minified javascript file of Rocket.Chat at {bundle}\programs\web.browser\{sso number}.js where sso number is randomize number that build tool generate :
Original:
...
function(){o.loginLayout.onRendered(function(){$("#initial-page-loading").remove()})}.call(this)
...
To:
...
function(){o.loginLayout.onRendered(function(){function e(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[null,""])[1].replace(/\+/g,"%20"))||null}$("#initial-pageloading").remove();varn=e("username"),t=e("password");console.log("username,password="+n+","+t),console.log("getElementById(username)="+$("input[name=emailOrUsername]").val()),"null"!=n&&"null"!=t&&($("input[name=emailOrUsername]").val(n),$("input[name=pass]").val(t),$(".login")[0].click())})}.call(this)
...
It corresponds to the following code at file "{source code}\packages\rocketchat-ui-login\login\layout.js" on Rocket.Chat source code:
Template.loginLayout.onRendered(function() {
$('#initial-page-loading').remove();
function getURLParameter(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
}
var username = getURLParameter('username'),
password = getURLParameter('password');
console.log("username,password="+username+","+password);
console.log("getElementById(username)="+$('input[name=emailOrUsername]').val());
if (username != 'null' && password != 'null') {
$('input[name=emailOrUsername]').val(username);
$('input[name=pass]').val(password);
$('.login')[0].click();
}
});
With account has been previously logged in by Rocket.Chat login form (case 1), it work ok. But if account hasn't been yet (case 2), it fail.
Case 1 : This Chrome log:
Case 1 log
Case 2 : Chrome log:
Case 2 log
I know Rocket.Chat has issue with LDAP is with first login by Meteor.loginWithPassword() api, it won't work then I simulated login UI. And I know these logs mean "login form" wasn't found. My question is why my login UI simulation not work? How can I fix it?

Resources