Ai un site, ai scris pagini bune, dar cand cauti pe Google numele firmei, nu apari unde te-astepti. Sau apar pagini vechi, de test, pe care le-ai fi vrut ascunse. De multe ori vina nu e la continut, ci la doua fisiere mici pe care Google le citeste inaintea oricarui text de pe site: robots.txt si sitemap.xml.
Ce face robots.txt
E un fisier text simplu, pus in radacina site-ului, la adresa numesite.ro/robots.txt. Ii spune robotului Google ce foldere sa nu se obosesca sa citeasca — de exemplu zona de administrare sau paginile de cautare interna, care n-au ce cauta in rezultate.
Nu e un zid de protectie. Orice pagina blocata aici poate fi in continuare vazuta de om daca stie link-ul, si poate chiar sa apara in Google fara continut, doar cu adresa, daca alt site face link catre ea. Robots.txt spune „nu citi”, nu „nu exista”.
User-agent: *
Disallow: /wp-admin/
Disallow: /cautare/
Sitemap: https://numesite.ro/sitemap.xml
Atat. Nu pui aici pagini pe care vrei sa le tii secrete de-a binelea — pentru asta trebuie parola, nu robots.txt.
Ce face sitemap.xml
Daca robots.txt spune ce sa ignore, sitemap.xml spune ce sa citeasca sigur. E o lista cu toate adresele importante de pe site, pe care Google o foloseste ca sa descopere pagini noi mai repede, mai ales daca site-ul e mare sau are pagini fara link-uri catre ele din alta parte.
La un site facut in WordPress, sitemap-ul se genereaza automat daca ai un plugin de SEO — la Yoast SEO se gaseste la numesite.ro/sitemap_index.xml. Nu trebuie scris de mana si nu trebuie actualizat manual; se reface singur cand publici o pagina noua.
Cum le pui impreuna sa lucreze
- Deschizi numesite.ro/robots.txt in browser si verifici ca fisierul exista si se vede.
- Verifici ca ultima linie contine adresa sitemap-ului, ca in exemplul de mai sus.
- Deschizi numesite.ro/sitemap.xml si te asiguri ca listeaza paginile reale, nu doar homepage-ul.
- Intri in Google Search Console, sectiunea Sitemaps, si adaugi adresa sitemap-ului acolo.
- Astepti cateva zile si verifici in aceeasi sectiune cate pagini au fost citite fata de cate ai trimis.
Greseala pe care o vad des
La un proiect pe care l-am preluat, robots.txt bloca intreg folderul /blog/ — ramasese asa de la o versiune veche a site-ului, cand blogul era in constructie. Rezultatul: zeci de articole scrise, niciunul indexat. Google nu le citea pentru ca i se spusese direct sa nu o faca.
Solutia nu a fost sa rescriu continutul, ci sa sterg o singura linie din robots.txt si sa astept reindexarea. In doua saptamani articolele au inceput sa apara in cautari. Merita verificat acest fisier inainte sa cauti alte explicatii pentru trafic slab.
Ce nu merita facut
Nu pune in sitemap pagini pe care le blochezi in robots.txt — sunt instructiuni contrare si Google le ignora pe amandoua cu neincredere. Nu bloca fisierele CSS si JavaScript din robots.txt, pentru ca Google are nevoie de ele ca sa vada cum arata pagina, nu doar textul din ea.
Întrebări frecvente
Daca nu am robots.txt deloc, e o problema?
Nu neaparat. Fara el, Google presupune ca poate citi tot site-ul. E o problema doar daca ai zone pe care vrei sa le tii departe de rezultatele de cautare.
Cat dureaza pana vad rezultate dupa ce corectez fisierele?
De obicei cateva zile pana la doua saptamani, in functie de cat de des trece Google pe la site. Se vede in Google Search Console, sectiunea Sitemaps, cate pagini au fost citite.
Trebuie sa scriu sitemap.xml manual daca am WordPress?
Nu. Un plugin de SEO precum Yoast SEO il genereaza si il actualizeaza singur de fiecare data cand publici o pagina noua.
You have a website, you wrote decent pages, but searching your own company name on Google doesn't bring up what you expect. Or old test pages show up instead. Often the problem isn't the content — it's two small files Google reads before anything else on the site: robots.txt and sitemap.xml.
What robots.txt does
It's a plain text file sitting at the root of your site, at yoursite.com/robots.txt. It tells Google's crawler which folders not to bother reading — the admin area, for instance, or internal search result pages that have no business showing up in Google.
It's not a lock. A blocked page can still be seen by anyone who has the link, and it can even show up in Google with just the URL and no content, if another site links to it. Robots.txt says 'don't read this,' not 'this doesn't exist.'
User-agent: *
Disallow: /wp-admin/
Disallow: /search/
Sitemap: https://yoursite.com/sitemap.xml
That's it. Don't put pages here that you actually want kept private — for that you need a password, not robots.txt.
What sitemap.xml does
If robots.txt says what to skip, sitemap.xml says what to read for sure. It's a list of every important URL on the site, which Google uses to find new pages faster — especially useful on a large site or one where some pages have no internal links pointing to them.
On a WordPress site, the sitemap gets generated automatically if you're running an SEO plugin — with Yoast SEO it lives at yoursite.com/sitemap_index.xml. You don't write it by hand and you don't update it manually; it rebuilds itself every time you publish a page.
Putting the two to work together
- Open yoursite.com/robots.txt in a browser and confirm the file exists and loads.
- Check that the last line points to your sitemap, as in the example above.
- Open yoursite.com/sitemap.xml and make sure it lists actual pages, not just the homepage.
- Go into Google Search Console, the Sitemaps section, and submit the sitemap URL there.
- Wait a few days and check in that same section how many pages were read against how many you submitted.
A mistake I see often
On a project I inherited, robots.txt was blocking the entire /blog/ folder — left over from an old version of the site, back when the blog was still under construction. The result: dozens of articles written, none indexed. Google wasn't reading them because it had been told directly not to.
The fix wasn't rewriting content, it was deleting one line from robots.txt and waiting for reindexing. Within two weeks the articles started showing up in search. This file is worth checking before hunting for other explanations for weak traffic.
What's not worth doing
Don't list pages in the sitemap that you're also blocking in robots.txt — that's a contradiction, and Google treats both instructions with suspicion. Don't block CSS and JavaScript files in robots.txt either, because Google needs them to see how the page actually renders, not just the text on it.
Frequently asked
If I don't have a robots.txt at all, is that a problem?
Not necessarily. Without it, Google assumes it can read the whole site. It only matters if you have areas you want kept out of search results.
How long until I see results after fixing the files?
Usually a few days to two weeks, depending on how often Google crawls the site. You can track it in Google Search Console, under Sitemaps, by checking how many pages were read.
Do I need to write sitemap.xml by hand if I use WordPress?
No. An SEO plugin like Yoast SEO generates it and keeps it updated automatically every time you publish a new page.


