How to remove a page from the index: 404 or 301?

I own a job board website with subdomains for each state, such as **ca.domain.com**, **tx.domain.com**, etc., each with terms and privacy pages located at paths like **/terms, /privacy**. Google has indexed these pages, leading to duplicate content warnings in Search Console. We set up redirects to the main domain page (**domain.com/terms**) to address this issue, but now the subdomain pages are flagged in the *\"Page indexing/Page with redirect\"* section. What is the best way to resolve this? Should I use a **404** instead of a **301 redirect**? Is it advisable to submit each page for temporary removal using the *\"Temporary removals\"* tool? Please provide guidance.

A 404 status code is the best approach to remove the subdomain pages from Google’s index.

While 301 redirects are typically used for permanent URL changes, in this scenario, you are aiming to prevent indexing altogether. A 404 signifies that the requested page does not exist, preventing Google from crawling and indexing it.

Redirecting with a 301, even if directed to a relevant page, will still signal to Google that the content is valuable. This could lead to confusion for Google, and the page might still be indexed despite the redirect.

It’s recommended to avoid using the “Temporary Removals” tool as it’s designed for short-term solutions. Since you aim to permanently remove the subdomain pages from the index, a 404 status code is the most appropriate solution.

Implement 404 error pages for the subdomain pages (e.g., ca.domain.com/terms, tx.domain.com/privacy) and confirm their status using a tool like Google Search Console’s “URL Inspection Tool.” You may also want to update your robots.txt file to disallow crawling of these subdomain paths.

Remember, Google needs time to process these changes. After implementing 404s, it may take several weeks for the pages to be removed from the index completely.