wordpresspantheon

How to update robots.txt on pantheon.io - wordpress


How can I update robots.txt on the pantheon environment Live site?

I have tried the following option 1) Via FTP 2) via word press SEO >> tool

Do I need to follow any steps, as it's a word press instance


Solution

  • Nothing special. Two options here,

    1. Create a robots.txt file locally. Add desired statements. Upload to Pantheon via SFTP or Git.

    2. Pull down the existing robots.txt file from Pantheon, modify as necessary, and push back up via SFTP or Git.

    In both cases, you need to keep in mind that Pantheon forces a Workflow. You have the Dev, Testing, and Live Servers. When you push, whether by Git or SFTP, you are essentially pushing to the Dev environment. Note that if you choose to use SFTP, you must have the Pantheon site in SFTP mode (not Git), and you should log into the Dev environment SFTP. From there, you must deploy up to the Live environment. You do this via the Pantheon Dashboard.

    EDIT: Since you are going the SFTP route, you will need to login via SFTP to the dev environment. Once logged in via SFTP, you will want to upload to the /code directory. This is the root directory for the WordPress installation. So you will have uploaded /code/robots.txt. Once you upload, you will need to return to the Pantheon Dashboard and commit your changes through Dev, Testing, and Production.

    Hope this helps.