1

I have a reverse proxy for http://www.xxxx.com/guides/ pointing to Wordpress on another domain. I want to edit and administer it via the other domain, but I don't want the contents to be publicly available, so there is no duplicate content penalties from Google. How can I set this up? I was thinking of adding

Add the following to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$
RewriteRule ^(/)?$ blog [L]

But will that still allow the ability for administrators to access hidden.domain.com/wp-admin?

0

To ensure your content isn't crawled from the hidden admin DOMAIN you could include something like this in your .htaccess file.

RewriteEngine On

#Force traffic to production URL
RewriteCond %{HTTP_HOST} !xxxx.com$ [NC]
RewriteRule (.*) http://www.xxxx.com/guides/%{REQEUST_URI} [R=301,L]

There is more than one way to handle this first redirect so your code may work too (didn't test it personally). I have used this snippet with success in multiple projects though.

The next part of your question needs a bit of additional work / clarification.

Please be aware that just because /wp-admin/ is visible, doesn't mean the content stored within that WP instance is accessible to the public or crawlable (the redirect above will handle standard web traffic)

That being said, there are several ways to restrict access to the /wp-admin/ area beyond basic WordPress credentials.

  1. IP Whitelisting via IPTables or similar solutions
  2. Restricting access from outside your network via VPN
  3. Changing the /wp-admin/ to something else to further obfuscate it
  4. Hardening your WP security with two-factor authentication, limited login attempts, anti brute-force measures, strong passwords, etc.

If items 1 or 2 are viable options you can extend your .htaccess to allow whitelisted traffic into the wp-admin area with something like this:

# block wp-admin traffic unless whitelisted
RewriteCond %{HTTP_HOST} !admin-domain.com$ [NC]
RewriteCond %{REQUEST_URI} ^/wp-admin
RewriteRule (.*) http://www.xxxx.com/guides/%{REQEUST_URI} [R=301,L]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.