Skip to content
Menu
DevSecOps Now!!!
  • About
  • Certifications
  • Contact
  • Courses
  • DevSecOps Consulting
  • DevSecOps Tools
  • Training
  • Tutorials
DevSecOps Now!!!

Setting Up Google reCAPTCHA for Main Domain and Subdomain

Posted on December 29, 2025

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

This tutorial explains how to correctly create and configure Google reCAPTCHA when your main website is already registered and you need reCAPTCHA to work on a subdomain, such as an authentication or login service.

It covers:

  • When to create a new key vs reuse an existing one
  • How Google Cloud Platform (GCP) fits into reCAPTCHA
  • How to handle subdomains properly
  • Choosing the correct reCAPTCHA version
  • Common mistakes and how to avoid them

This guide is written for real production use, especially for login, authentication, and secure forms.


1. Understanding the Problem Scenario

Your situation is:

  • Main website: wizbrand.com
  • Authentication or form running on: auth.wizbrand.com
  • The website is already registered in Google Cloud Platform
  • You reached the Google reCAPTCHA โ€œRegister a new siteโ€ page
  • You are unsure:
    • Whether a new key is needed
    • How to handle subdomains
    • Which reCAPTCHA version to select
    • Whether a new GCP project is required

This confusion is very common, especially when authentication is moved to a subdomain.


2. Key Concept: Domains vs Google Cloud Projects

Before configuring anything, it is important to understand this clearly.

Google Cloud Project

  • A Google Cloud project is only a container
  • It does NOT restrict domains
  • You can use the same project for multiple sites and subdomains

reCAPTCHA Site Configuration

  • This is where domains are actually validated
  • If a domain or subdomain is not listed here, reCAPTCHA will fail

This means:
You do not need a new Google Cloud project just because you added a subdomain.


3. When Do You Need a New reCAPTCHA Key?

You need a new key only if:

  • You want to change reCAPTCHA version (for example, v3 to v2)
  • You want separate analytics or security rules
  • You want isolation between different applications

You do NOT need a new key just because:

  • You added a subdomain
  • You moved login to auth.wizbrand.com

In most authentication setups, reusing the same key is correct.


4. Choosing the Correct reCAPTCHA Version

Google offers two common options:

reCAPTCHA v3 (Score-Based)

  • No checkbox
  • Returns a score (0.0 to 1.0)
  • Requires backend score logic
  • Can block real users unintentionally
  • Not ideal for login pages

reCAPTCHA v2 (Challenge-Based)

  • Checkbox or challenge
  • Clear user interaction
  • More reliable for authentication
  • Easier to debug and maintain

Recommendation for auth.wizbrand.com

For login, authentication, and security-sensitive forms:

Use reCAPTCHA v2 (Challenge)

This is the safest and most stable option for production auth systems.


5. Creating or Updating reCAPTCHA Configuration (Step-by-Step)

You are already on the correct page:
โ€œRegister a new siteโ€ in Google reCAPTCHA Admin.

Step 1: Label

This is only for your internal reference.

Recommended examples:

  • Wizbrand Auth Login
  • Wizbrand reCAPTCHA

This field does not affect functionality.


Step 2: Select reCAPTCHA Type

Choose:

  • Challenge (v2)

Avoid score-based v3 for login unless you fully control backend scoring.


Step 3: Add Domains (Most Important Step)

You must explicitly add both the main domain and the subdomain.

Add:

  • wizbrand.com
  • auth.wizbrand.com

Important rules:

  • Do not include https://
  • Do not include trailing slashes
  • Subdomains must be added explicitly

If auth.wizbrand.com is missing, reCAPTCHA will fail even if wizbrand.com works.


Step 4: Google Cloud Platform Project

Select your existing project:

  • motoshare (or whichever project you already use)

No new project is required.


Step 5: Submit

After submitting, Google will generate:

  • Site Key
  • Secret Key

6. Understanding Site Key vs Secret Key

This distinction is critical.

Site Key

  • Used in frontend (HTML, login page, Keycloak theme)
  • Safe to expose publicly

Secret Key

  • Used only on backend
  • Must never be placed in frontend code
  • Must be stored securely (environment variables)

If the secret key leaks, your captcha can be abused.


7. Using reCAPTCHA on auth.wizbrand.com

Frontend Usage

Use the same site key on both:

  • wizbrand.com
  • auth.wizbrand.com

The domain check is handled automatically by Google.

Backend Verification

No changes are needed when adding a subdomain.
The same secret key works across all allowed domains.


8. Important Caching and Browser Considerations

After adding a new domain:

  • Clear browser cache
  • Hard refresh the page
  • If using CDN, purge cache
  • If using server-side rendered templates, clear view cache

Many developers think reCAPTCHA is broken when it is actually cached HTML.


9. Common Mistakes That Cause reCAPTCHA Failure

These are the most frequent real-world issues:

  • Adding only wizbrand.com but not auth.wizbrand.com
  • Mixing v2 keys with v3 code
  • Putting secret key in JavaScript
  • Using wrong site key on subdomain
  • Forgetting to save domain changes
  • CDN caching old markup
  • Using localhost without adding it to allowed domains

Avoiding these prevents 90% of captcha issues.


10. Keycloak / Auth System Specific Notes

If auth.wizbrand.com hosts:

  • Keycloak
  • OAuth login
  • SSO gateway
  • Central authentication service

Then:

  • reCAPTCHA v2 is strongly recommended
  • Domain must be explicitly listed
  • Same site key can be reused
  • Secret key must remain server-side

There is no CORS issue with reCAPTCHA itself.


11. Final Checklist Before Going Live

Before testing in production, verify:

  • auth.wizbrand.com is listed in reCAPTCHA domains
  • Correct reCAPTCHA version is selected
  • Site key is used only in frontend
  • Secret key is stored securely
  • Cache is cleared
  • Login page loads captcha correctly

If all of these are correct, reCAPTCHA will work reliably.


Post Views: 713
  • Google reCAPTCHA
  • reCAPTCHA for Main Domain
  • reCAPTCHA for Subdomain
  • Setting Up Google reCAPTCHA
  • Setting Up Google reCAPTCHA for Main Domain and Subdomain
Subscribe
Login
Notify of
guest
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
  • Certified AIOps Engineer: The Complete Career Path and Certification Guide
  • How to Rename Apache Virtual Host Files Safely (Step-by-Step Guide for Linux)
  • AIOps Foundation Certification: Everything You Need to Know to Get Certified
  • DevOps to Certified Site Reliability Professional: A Senior Mentorโ€™s Guide
  • Certified Site Reliability Manager Training, Preparation, and Career Mapping
  • Certified Site Reliability Architect: The Complete Career Guide
  • What Is a VPN? A Complete Beginner-to-Advanced Tutorial
  • How to Install, Secure, and Tune MySQL 8.4 on Ubuntu 24.04 for Apache Event MPM and PHP-FPM
  • Complete Guide to Certified Site Reliability Engineer Career
  • Certified DevSecOps Professional Step by Step
  • Certified DevSecOps Manager: Complete Career Guide
  • Certified DevSecOps Engineer: Skills, Career Path and Certification Guide
  • Step-by-Step: Become a Certified DevSecOps Architect
  • Tuning PHP 8.3 for Apache Event MPM and PHP-FPM on Ubuntu: A Complete Step-by-Step Production Guide
  • Complete Step-by-Step Guide to Configure Apache Event MPM, Create index.php, Set Up VirtualHost, and Fix Ubuntu Default Page
  • Convert XAMPP Apache to Event MPM + System PHP-FPM
  • The Gateway to System Observability Engineering (MOE)
  • How to Finetune Apache and Prove It Works: A Real-World Guide to Testing Performance, Concurrency, HTTP/2, Memory, CPU, and Security
  • Building a High-Performance Apache Event MPM + PHP-FPM + MariaDB Stack (Advanced Server Optimization Guide)
  • Master Infrastructure as Code: The Complete Hashicorp Terraform Associate Guide
  • Building a High-Performance Apache Server with Event MPM + PHP-FPM (Step-by-Step Guide)
  • Is XAMPP Safer for Production Than Using Apache and PHP as Root? 2026 Practical Guide
  • Unlock Cloud Security Expertise with Certified Kubernetes Security Specialist (CKS)
  • How to Fix wpDiscuz Not Replacing Default WordPress Comments in Block Themes
  • Complete Guide to Certified Kubernetes Application Developer Certification
  • Overview of Certified Kubernetes Administrator (CKA) Certification
  • How to Install and Configure XAMPP on Ubuntu 24 Server (Latest Version โ€“ 2026 Complete Guide)
  • Mastering the Google Cloud Professional DevOps Engineer
  • Mastering Azure Cloud Security: The AZ-500 Path
  • Why AZ-400 is Essential for Global Cloud Engineering Roles

Recent Comments

  1. digital banking on Complete Tutorial: Setting Up Laravel Telescope Correctly (Windows + XAMPP + Custom Domain)
  2. SAHIL DHINGRA on How to Uninstall Xampp from your machine when it is not visible in Control panel programs & Feature ?
  3. Abhishek on MySQL: List of Comprehensive List of approach to secure MySQL servers.
  4. Kristina on Best practices to followed in .httacess to avoid DDOS attack?
  5. Roshan Jha on Git all Commands

Archives

  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022

Categories

  • Ai
  • AI Blogging
  • AiOps
  • ajax
  • Android Studio
  • Antimalware
  • Antivirus
  • Apache
  • Api
  • API Security
  • Api Testing
  • APK
  • Aws
  • Bike Rental Services
  • ChatGPT
  • Code Linting
  • Composer
  • cPanel
  • Cyber Threat Intelligence
  • Cybersecurity
  • Data Loss Prevention
  • Database
  • dataops
  • Deception Technology
  • DeepSeek
  • Devops
  • DevSecOps
  • DevTools
  • Digital Asset Management
  • Digital Certificates
  • Docker
  • Drupal
  • emulator
  • Encryption Tools
  • Endpoint Security Tools
  • Error
  • facebook
  • Firewalls
  • Flutter
  • git
  • GITHUB
  • Google Antigravity
  • Google play console
  • Google reCAPTCHA
  • Gradle
  • Guest posting
  • health and fitness
  • IDE
  • Identity and Access Management
  • Incident Response
  • Instagram
  • Intrusion Detection and Prevention Systems
  • jobs
  • Joomla
  • Keycloak
  • Laravel
  • Law News
  • Lawyer Discussion
  • Legal Advice
  • Linkedin
  • Linkedin Api
  • Linux
  • Livewire
  • Medical Tourism
  • MlOps
  • MobaXterm
  • Mobile Device Management
  • Multi-Factor Authentication
  • MySql
  • Network Traffic Analysis tools
  • Paytm
  • Penetration Testing
  • php
  • PHPMyAdmin
  • Pinterest Api
  • Quora
  • SAST
  • SecOps
  • Secure File Transfer Protocol
  • Security Analytics Tools
  • Security Auditing Tools
  • Security Information and Event Management
  • Seo
  • Server Management Tools
  • Single Sign-On
  • Site Reliability Engineering
  • soft 404
  • software
  • SuiteCRM
  • SysOps
  • Threat Model
  • Twitter
  • Twitter Api
  • ubuntu
  • Uncategorized
  • Virtual Host
  • Virtual Private Networks
  • VPNs
  • Vulnerability Assessment Tools
  • Web Application Firewalls
  • Windows Processor
  • Wordpress
  • WSL (Windows Subsystem for Linux)
  • X.com
  • Xampp
  • Youtube
©2026 DevSecOps Now!!! | WordPress Theme: EcoCoded
wpDiscuz