Blogger Indexing API With NPM Node Javascript On FreeBSD

Google Indexing API is Google's programming interface. It allows webmasters to notify the search engine when certain site elements, pages or pieces of content have been added, removed or changed. Adding a URL in this manner should be a signal that prompts Google to crawl the page and quickly index new elements - and this can lead to increased site traffic and improved rankings in search results.

When Google allows you to force index one page at a time in the Search Console, SEO specialists are looking for different ways to bulk submit URLs to the index. Google's Indexing API for reindexing will help us with this. With its help, you will learn how to do this quickly and without any effort by sending the necessary URLs based on the Indexing API. It will help you crawl and submit pages to the index in bulk. You configure it once, and then simply edit the file with the URL and run the script.

What we will work on to connect the Indexing API:
  1. Connecting Indexing API to Google Search Console.
  2. Getting a JSON key.
  3. Installation and configuration of node.js.
  4. This tool allows the webmaster to access data stored in Google search engine indexes and conditionally manipulate them. In other words, you help the search engine see new content by pointing to pages with updated content or completely new pages.

"Google recommends using the Indexing API only for pages with JobPosting or BroadcastEvent data types if they are embedded inside a VideoObject. Indexing this way works for the time being for pages with any other structured data, but proceed with caution"


ASystem Requirements
OS: FreeBSD 13.2 Stable
Hostname: ns1
Domain: uniexplore.com
IP Address: 192.168.5.2
NPM version:


BCreate Service Account Google Cloud Platform

At the first stage, you need to configure access in the Indexing API console. To do this, you need to go to the Google Cloud Platform page and create a service account.

1. Create a project
Go to Google Cloud Platform. Depending on whether you have worked with the platform before or not, you need to click on the project selection button:









CCreate JSON KEY

Now we need to click on “Actions”, to the right of the created account:



In the window that opens, click on: “ADD KEY” (“Add key”) and select the item: “Create new key” (“Create a new key”):




json.key Automatic Download to your computer. File name is "unix-bsd-project-blogger-a3ad06815d72.json".

Below are the contents of the file "unix-bsd-project-blogger-a3ad06815d72.json".

{
  "type": "service_account",
  "project_id": "unix-bsd-project-blogger",
  "private_key_id": "a3ad06815d7230f72d592d3826569d0362404668",
  "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCjYNsznx6mj9G/\nnVP6Y8AKrZ9zvgg0ArZ2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WlE0oLkgR80r4qEOS2DvHahfrk9\nUJiMXZjlKdH0W/1B7g2a2iPxoPMcUqdxXQoIIpPNzs1ibd3Tcng17NtF6hYaprqj\nAsRkLCwBxucZRHMq5sWeTl69sKmbSq6UwYXytZ26Y9CoVldBOwes9BxfFwKBgQCR\ndIAdTpcJIhrDRoFJOUNeHovtgkTQkKZhU9lI7fDv3s2wYEt4aG/c/J48WAa/9NSF\n1p4iiFQqj5ePDNgAtiTqx1U9+SX9i5Fm4pMzTPT1gFH1Vz8YL7GIP2P5mnAKR/O8\nS+q7fQSTZdItrj/B3MSqAwygpuUBVtCSI28gda1nRQKBgHRUbAAr3i1mGIBbwpCj\nVVF8fRUWEOPUamSW/D/3nSNQDcFnNBHds5eifQ/ivJEkW9JMOMJO9iJ2nF0F15cT\nC6aHdqMbd7sm8HP7HwOF5wdxOJEOLx168piLMMOMVwdiQWNnlQ0f+MMxOUEIjyLB\nHlotMce9cDwtSmz/daWqKzOq\n-----END PRIVATE KEY-----\n",
  "client_email": "blogger-unixbsd@unix-bsd-project-blogger.iam.gserviceaccount.com",
  "client_id": "109095879295930179208",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/blogger-unixbsd%40unix-bsd-project-blogger.iam.gserviceaccount.com",
  "universe_domain": "googleapis.com"
}



DCreate Credentials

Under the same window of API and services, Click on Credentials (left vertical menu). Click "+ Create Credentials" then "API Key" which you can save (but not mandatory).





After completing these steps, we need to enable the Index API. To do this, click on the link and enable the API.







So, you're all set to use the script from the Google Cloud Platform.


ELink the  Google Cloud Platform To Google Search Console

To link the script to the Google Search Console panel of the site being promoted, you need to assign the full owner to client_email from the Google Cloud Platform.
  1. Open Google Search Console settings. In the “Users and Permissions” subsection you need to enter client_email from the file that we downloaded to your computer.
  2. You must specify the rights as "Owner". We remind you that you can specify user rights in the “Manage resource owners” section. To get into it, you need to open the GSC settings...






FSetup The node JS For Indexing Blogger API

This is a third-party script that allows you to bulk send URLs to the Google Indexing API using a batch request. It will help you index your site's pages in bulk, without having to manually request each URL to be submitted in the Search Console interface.

The preliminary setup is as follows:
  1. First, you'll need to set up access to the indexing API in Google Cloud Platform - follow the instructions provided .
  2. Add the URLs to the urls.txt file that should be indexed.
  3. Check domain permissions in Search Console to submit URLs for indexing . At this step, you will need to confirm your domain rights with GSC, if they have not already been verified. To verify domain ownership, you need to add your service account email address (see service_account.json - client_email) and add it as an owner (“delegate”) in Search Console.
  4. Once you have access to the Indexing API, you will be able to download a public/private key pair JSON file that contains all your credentials and should be saved under the name service_account.json.
  5. Go to GWC (Webmaster Center) or set up a verification token directly in Google Search Console.
  6. Click on the required resource (verified).
  7. Scroll down the page and click Add Owner.
  8. Add your service account email address as the owner.
Before you read the next article, we suggest you read the previous article:



Now let's take a closer look at setting up the script.

First of all, download the script we need from GitHub and save it to your hard drive. Don't worry: no GitHub skills are needed. Just click on the green "Code" button and select "Download ZIP".

Type the following command in the PUTY FreeBSD console.

root@ns1:~ # cd /tmp
root@ns1:/tmp # git clone https://github.com/swalker-888/google-indexing-api-bulk.git
root@ns1:/tmp # cd google-indexing-api-bulk
root@ns1:/tmp/google-indexing-api-bulk # ls
.git                    index.js                service_account.json
.gitignore              package-lock.json       urls.txt
README.md               package.json
root@ns1:/tmp/google-indexing-api-bulk #
Now we need to replace the contents of the “service_account.json” file with the contents of the unix-bsd-project-blogger-a3ad06815d72.json file.

Delete the entire contents of the service_account.json file and replace it with a script from the unix-bsd-project-blogger-a3ad06815d72.json file, as in the example below.

{
  "type": "service_account",
  "project_id": "unix-bsd-project-blogger",
  "private_key_id": "a3ad06815d7230f72d592d3826569d0362404668",
  "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCjYNsznx6mj9G/\nnVP6Y8AKr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+po1R5aBtP7SMW3WlE0oLkgR80r4qEOS2DvHahfrk9\nUJiMXZjlKdH0W/1B7g2a2iPxoPMcUqdxXQoIIpPNzs1ibd3Tcng17NtF6hYaprqj\nAsRkLCwBxucZRHMq5sWeTl69sKmbSq6UwYXytZ26Y9CoVldBOwes9BxfFwKBgQCR\ndIAdTpcJIhrDRoFJOUNeHovtgkTQkKZhU9lI7fDv3s2wYEt4aG/c/J48WAa/9NSF\n1p4iiFQqj5ePDNgAtiTqx1U9+SX9i5Fm4pMzTPT1gFH1Vz8YL7GIP2P5mnAKR/O8\nS+q7fQSTZdItrj/B3MSqAwygpuUBVtCSI28gda1nRQKBgHRUbAAr3i1mGIBbwpCj\nVVF8fRUWEOPUamSW/D/3nSNQDcFnNBHds5eifQ/ivJEkW9JMOMJO9iJ2nF0F15cT\nC6aHdqMbd7sm8HP7HwOF5wdxOJEOLx168piLMMOMVwdiQWNnlQ0f+MMxOUEIjyLB\nHlotMce9cDwtSmz/daWqKzOq\n-----END PRIVATE KEY-----\n",
  "client_email": "blogger-unixbsd@unix-bsd-project-blogger.iam.gserviceaccount.com",
  "client_id": "109095879295930179208",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/blogger-unixbsd%40unix-bsd-project-blogger.iam.gserviceaccount.com",
  "universe_domain": "googleapis.com"
}

After that, enter the entire contents of the URL from your Blogspot into the /tmp/google-indexing-api-bulk/urls.txt file.

root@ns1:/tmp/google-indexing-api-bulk # ee urls.txt

https://www.unixwinbsd.site/2023/11/how-to-install-freebsd-python-venv.html
https://www.unixwinbsd.site/2023/11/how-to-install-sudo-on-freebsd-system.html
https://www.unixwinbsd.site/2023/11/freebsd-and-python-writing-daemon_4.html
https://www.unixwinbsd.site/2023/11/freebsd-and-python-writing-daemon.html
https://www.unixwinbsd.site/2023/11/how-to-install-golang-go-language-on.html
https://www.unixwinbsd.site/2023/11/how-to-install-npm-nodejs-on-freebsd.html
https://www.unixwinbsd.site/2023/11/how-to-use-stream-editor-sed-command-on.html
https://www.unixwinbsd.site/2023/11/mudahnya-membuat-user-dan-group-pada.html
https://www.unixwinbsd.site/2023/11/apa-yang-harus-dilakukan-setelah.html
https://www.unixwinbsd.site/2023/11/mengkonfigurasi-dns-bind-sebagai.html
https://www.unixwinbsd.site/2023/11/cara-install-java-openjdk-pada-komputer.html
https://www.unixwinbsd.site/2023/11/polipo-sebagai-proxy-server-dengan.html
https://www.unixwinbsd.site/2023/11/konfigurasi-unbound-sebagai-dns-server.html
https://www.unixwinbsd.site/2023/11/merotasi-ip-public-web-scraping-dengan.html
https://www.unixwinbsd.site/2023/11/belajar-instalasi-dan-konfigurasi.html
https://www.unixwinbsd.site/2023/10/freebsd-install-bugzilla-with-apache24.html
https://www.unixwinbsd.site/2023/10/belajar-cara-install-nginx-web-server.html
https://www.unixwinbsd.site/2023/10/tor-dan-privoxy-security-anonymous.html
https://www.unixwinbsd.site/2023/10/installation-and-configuration-tor-on.html
https://www.unixwinbsd.site/2023/10/belajar-nginstall-mysql-server-pada.html
https://www.unixwinbsd.site/2023/10/speedtest-cli-on-freebsd-to-check.html
https://www.unixwinbsd.site/2023/09/belajar-membuat-blog-dengan-go-hugo.html
https://www.unixwinbsd.site/2023/09/membuat-website-database-with-apache24.html
https://www.unixwinbsd.site/2023/09/installation-and-basic-setup-of-tomcat.html
https://www.unixwinbsd.site/2023/07/cara-cepat-konfigurasi-openssh-server.html

Then we install the Node Javascript library.

root@ns1:~ # cd /tmp/google-indexing-api-bulk
root@ns1:/tmp/google-indexing-api-bulk # npm install requests
root@ns1:/tmp/google-indexing-api-bulk # npm audit fix
root@ns1:/tmp/google-indexing-api-bulk # npm audit fix --force
After all the library files are installed, run the last node command index.js

root@ns1:~ # cd /tmp/google-indexing-api-bulk
root@ns1:/tmp/google-indexing-api-bulk # node index.js
  "url": "https://www.unixwinbsd.site/2023/07/cara-cepat-konfigurasi-openssh-server.html",
      "type": "URL_UPDATED",
      "notifyTime": "2023-11-09T14:40:50.724985668Z"
    }
  }
}

--batch_nycum60CIsB-ul9X4JwtniZ6X4GXJCZB
Content-Type: application/http
Content-ID: response-

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Vary: Origin
Vary: X-Origin
Vary: Referer

{
  "urlNotificationMetadata": {
    "url": "https://www.unixwinbsd.site/2023/11/how-to-crate-and-connect-feedburner-to.html",
    "latestUpdate": {
      "url": "https://www.unixwinbsd.site/2023/11/how-to-crate-and-connect-feedburner-to.html",
      "type": "URL_UPDATED",
      "notifyTime": "2023-11-09T14:40:50.727471782Z"
    }
  }
}

--batch_nycum60CIsB-ul9X4JwtniZ6X4GXJCZB
Content-Type: application/http
Content-ID: response-

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Vary: Origin
Vary: X-Origin
Vary: Referer

{
  "urlNotificationMetadata": {
    "url": "https://www.unixwinbsd.site/2023/11/freebsd-anonymousbitcoin-wallet-with-tor.html",
    "latestUpdate": {
      "url": "https://www.unixwinbsd.site/2023/11/freebsd-anonymousbitcoin-wallet-with-tor.html",
      "type": "URL_UPDATED",
      "notifyTime": "2023-11-09T14:40:50.726533078Z"
    }
  }
}

--batch_nycum60CIsB-ul9X4JwtniZ6X4GXJCZB--

root@ns1:/tmp/google-indexing-api-bulk #

Incorporating Node.js into your website’s architecture can significantly improve its Google indexing potential. By leveraging its server-side rendering capabilities, efficient content handling, and performance optimization features, you can enhance your site’s visibility, attract more organic traffic, and ultimately, achieve your online goals. Stay ahead in the competitive online landscape by harnessing the power of Node.js and giving your website the SEO boost it deserves.
Iwan Setiawan

I Like Adventure: Mahameru Mount, Rinjani Mount I Like Writer FreeBSD

Post a Comment

Previous Post Next Post