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/.
- Local project and folder
pnpm init
pnpm add google-indexing-script
- Update the
package.json scripts
"seo": "node index.js"
touch index.js
- 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);
- Follow the steps in the https://github.com/goenning/google-indexing-script?tab=readme-ov-file#preparation
- Download the credentials JSON https://github.com/goenning/google-indexing-script/issues/2
- Rename the download JSON and move to the folder where the
index.js
is located at - Go to Google Search Console
- Select the Website to index
- Go to settings
- Users and permissions
- Add user
- Add the email from the
<username@project>.iam.gserviceaccount.com
that you created in the step 6 preparations - In the permissions, Select
Owner
- 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]
gitroomhq / postiz-app
📨 The ultimate social media scheduling tool, with a bunch of AI 🤖
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.
Explore the docs »
Register
·
Join Our Discord
·
X
·
Gitroom
hero.1.mp4
✨ Features
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.
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:
Happy hacking!
Working on the audio version
Top comments (0)