Add Sitemap Link in Robots.txt for Multisite

Hi there,

I need to add a Sitemap Link in Robots.txt to my multisite install (this is sitemap link for sub-directory multisite: https://franklinchiropracticdubai.com/sitemap_index.xml) but not sure where this is done. I have looked through the forum but cant seem to find a solution.

Thanks

Barry

  • Ash
    • WordPress Hacker

    Hello Barry

    You can use cPanel file manager or a FTP client and go to /public_html/ folder, and open robots.txt file. Then add the following in the first line:

    Sitemap: https://franklinchiropracticdubai.com/sitemap_index.xml

    It may look like this alltogether:

    Sitemap: https://franklinchiropracticdubai.com/sitemap_index.xml
    User-agent:*
    Disallow:

    Hope it helps! Please feel free to ask more questions if you have any.

    Have a nice day!

    Cheers,

    Ash

  • Barry
    • WPMU DEV Initiate

    Hi Ash

    I dont see the robots.txt, no is Tools/Edit visible in Yoast either to edit there.

    define( 'DISALLOW_FILE_EDIT', false )

    If I create a robots.txt for multisite what must go in it? Would it look like this:

    Sitemap: https://franklinchiropracticdubai.com/sitemap_index.xml
    Sitemap: https://xxx.com/sitemap_index.xml
    Sitemap: etc etc
    User-agent:*
    Disallow:

  • Ash
    • WordPress Hacker

    Hello Barry

    Correct, you can add multiple sitemaps in each new line, like the following:

    User-agent: *
    Disallow:
    Disallow: /cgi-bin/
    Disallow: /wp-admin/
    Disallow: /wp-content/plugins/
    Sitemap: https://franklinchiropracticdubai.com/sitemap_index.xml
    Sitemap: https://xxx.com/sitemap_index.xml

    Hope it helps! Please feel free to ask more questions if you have any.

    Have a nice day!

    Cheers,

    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.