Title: admin-ajax.php redirect
Last modified: October 25, 2023

---

# admin-ajax.php redirect

 *  [Ben](https://wordpress.org/support/users/benrecords/)
 * (@benrecords)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/admin-ajax-php-redirect/)
 * Hi,
 * I’m getting 302 redirects from admin-ajax.php calls to my website home page.
 * I read on another topic that custom admin-ajax.php path could lead to that behaviour.
   But I didn’t change the admin-ajax.php url and still get the redirect (even after
   clearing cache).
 * Is it normal as I changed the wp-admin path (not in the Ajax Security section)?
 * Is it possible to hide wp-admin and still get admin-ajax.php to work ?
 * Thanks for your help
    -  This topic was modified 2 years, 7 months ago by [Ben](https://wordpress.org/support/users/benrecords/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Peter](https://wordpress.org/support/users/petersquirrly/)
 * (@petersquirrly)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/admin-ajax-php-redirect/#post-17151547)
 * Hi Ben,
 * Thank you for reaching out!
 * Please go to Change Paths > Ajax Security and enable the **Hide wp-admin from
   Ajax URL **option.
 * Let us know if you still get any errors after doing this.
 *  Thread Starter [Ben](https://wordpress.org/support/users/benrecords/)
 * (@benrecords)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/admin-ajax-php-redirect/#post-17170764)
 * Hi Peter,
 * Thanks for your answer. I tried it but it didn’t change my 302 redirect problem.
 * Finally, I set a custom admin-ajax URL and it worked. So I keep my new ajax url
   as it seems to work with all my plugins.
 * Thanks for your help
 *  Plugin Support [Peter](https://wordpress.org/support/users/petersquirrly/)
 * (@petersquirrly)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/admin-ajax-php-redirect/#post-17171732)
 * Great to hear that it’s working now!
 * If anything else comes up, we are one reply away.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘admin-ajax.php redirect’ is closed to new replies.

 * ![](https://ps.w.org/hide-my-wp/assets/icon-256x256.png?rev=3217792)
 * [WP Ghost (Hide My WP Ghost) - Security & Firewall](https://wordpress.org/plugins/hide-my-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hide-my-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hide-my-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/hide-my-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hide-my-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hide-my-wp/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Peter](https://wordpress.org/support/users/petersquirrly/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/admin-ajax-php-redirect/#post-17171732)
 * Status: not resolved