DEV Community

Cover image for Looking for an easy way to request Google Search Console to index your website pages?
Ismael Garcia
Ismael Garcia

Posted on • Edited on

Looking for an easy way to request Google Search Console to index your website pages?

Looking for an easy way to request Google Search Console to index your website pages?

Here is how a handle the request to index all the 764 pages from https://must-know-resources-for-programmers.giessen.dev/.

  1. Local project and folder
    1. pnpm init
    2. pnpm add google-indexing-script
    3. Update the package.json scripts "seo": "node index.js"
    4. touch index.js
    5. add the following to the index.js file
import { index } from "google-indexing-script";
import serviceAccount from "./service_account.json" assert { type: "json" };

index("<WEBSITE_URL_HERE>", {
  client_email: serviceAccount.client_email,
    private_key: serviceAccount.private_key,
  quota: {
    rpmRetry: true
  }
})
  .then(console.log)
  .catch(console.error);

Enter fullscreen mode Exit fullscreen mode
  1. Follow the steps in the https://github.com/goenning/google-indexing-script?tab=readme-ov-file#preparation
  2. Download the credentials JSON https://github.com/goenning/google-indexing-script/issues/2
  3. Rename the download JSON and move to the folder where the index.js is located at
  4. Go to Google Search Console
    1. Select the Website to index
    2. Go to settings
    3. Users and permissions
    4. Add user
    5. Add the email from the <username@project>.iam.gserviceaccount.com that you created in the step 6 preparations
    6. In the permissions, Select Owner
  5. Now you can run the pnpm seo in the terminal and that should make the request to index all the pages that are in the sitemap of your website

Personal Recommendation of the week:
(postiz-app)[https://github.com/gitroomhq/postiz-app]

GitHub logo gitroomhq / postiz-app

📨 The ultimate social media scheduling tool, with a bunch of AI 🤖

Postiz Logo

License

Your ultimate AI social media scheduling tool



Postiz: An alternative to: Buffer.com, Hypefury, Twitter Hunter, Etc...



Postiz offers everything you need to manage your social media posts,
build an audience, capture leads, and grow your business.

Instagram Youtube Dribbble Linkedin Reddit TikTok Facebook Pinterest Threads X X X X X


Explore the docs »

Register · Join Our Discord · X · Gitroom


hero.1.mp4

✨ Features

Image 1 Image 2
Image 3 Image 4

Intro

  • Schedule all your social media posts (many AI features)
  • Measure your work with analytics.
  • Collaborate with other team members to exchange or buy posts.
  • Invite your team members to collaborate, comment, and schedule posts.
  • At the moment there is no difference between the hosted version to the self-hosted version

Tech Stack

  • NX (Monorepo)
  • NextJS (React)
  • NestJS
  • Prisma (Default to PostgreSQL)
  • Redis (BullMQ)
  • Resend (email notifications)

Quick Start

To have the project up and running, please follow the Quick Start Guide

License

This repository's source code is available under the Apache 2.0 License.

g2







If you're looking for a manage version of Postiz you can sign up for the service, that way we help this amazing open source:

Signup for Postiz


Happy hacking!

Working on the audio version

The Loop VueJs Podcast

Podcast Episode

Top comments (0)