WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 websites http://www.aaa.com and http://www.bbb.com and need it show the same.

now i put iframe in index.html and upload to aaa.com. it's ok for frontend but it's doesn't work for backend, it's show blank page.

anyone can suggest me how can i do with this problem ? thank you very much :D

share|improve this question
hmmm this doesn't seem like the best approach to making this work, have you looked into multisite and domain mapping? – Tom J Nowell Apr 19 '12 at 9:34

By default WordPress sends an HTTP header to prevent iframe embedding on /wp_admin/ and /wp-login.php:

X-Frame-Options: SAMEORIGIN

That's a security feature. If you want to remove this header remove the filters:

remove_action( 'login_init', 'send_frame_options_header' );
remove_action( 'admin_init', 'send_frame_options_header' );

But you should really use the multisite feature as Tom J Nowell suggested.

share|improve this answer
Thanks Tom and toscho :) the problem is I cannot control domain or anything in aaa.com, just ftp I can use for transfer files to site and it's not work properly on IIS server and sure admin cannot fix for me. so i decide to move to my hosting that I can control and it's Apache. everything works fine with iframe except backend :( did you guys have some suggestion ? thank you very much :D – toonztudio Apr 21 '12 at 2:55

Tried to extend the version of @toscho

    //remove the restriction
    remove_action( 'login_init', 'send_frame_options_header' );
    remove_action( 'admin_init', 'send_frame_options_header' );

    //for added security
    add_action( 'login_init', 'Access_Control_Allow_Origin' );
    add_action( 'admin_init', 'Access_Control_Allow_Origin' );

    function Access_Control_Allow_Origin(){
        $allowed_origins=array(//add your domains or keeps empty
            foreach($allowed_origins as $allowed_origin){
                if (strstr($origin,$allowed_origin)){
            return true;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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