X
X
xXRustamXx2021-01-11 02:58:01
Search Engine Optimization
xXRustamXx, 2021-01-11 02:58:01

Main domain indexing?

The site https://site.com makes a 302 redirect to the subdomain https://test.site.com , I don't want the subdomain to be indexed, so I wrote disallow / for all agents in the robots.txt file, but I ran into a problem, Google bot cannot index pages for the main domain, and this is logical. written disallow. I need to have page indexing for the main domain, but hidden for the subdomain, can this be done somehow? Or will it be necessary to remove disallow for the subdomain and put up with it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Danny Arty, 2021-01-11
@DanArst

Then do not 301, but 302 redirect, if you need it directly. Then the main domain will continue to be indexed by search engines despite the redirect

E
Exploding, 2021-01-13
@Exploding

There are 2 different sites (site.com and test.site.com), each of them has its own robots.txt, we take it and directly write in what needs to be indexed - allow, and in the one that does not need to be indexed - prohibit.
They invent every kind of eybohu ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question