Title: Set IP for HTTP request
Last modified: July 25, 2023

---

# Set IP for HTTP request

 *  Resolved [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-ip-for-http-request/)
 * Hi, this is a feature request.
 * I am currently making a new website for our company and I wanted to measure its
   performance with your plugin. The domain is currently still pointing towards 
   the old hosting server with the old site and we are working on the new website
   by pointing the domain to the new ip-address locally via the hosts file. To measure
   the site’s performance I would need to be able to set the IP-Address for the 
   HTTP Request.
 * Thanks for considering this request.

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

 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-ip-for-http-request/#post-16923100)
 * It’s on our todo list, but I’m not sure yet how that can be implemented. The 
   profiler connects to the remote site using the WordPress API, and I don’t know
   if we can change the IP or if we need to write on own functions rather than relying
   on the WP API.
   In the meantime, if you have root access to the new server, you
   can add the domain and new IP to the new server’s host file too so that when 
   running Code Profiler on the new server, it won’t connect to the old one.
 *  Thread Starter [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-ip-for-http-request/#post-16923411)
 * Thanks for the info, I sadly do not have root access but thank you for the tip
   and thank your for making this totally awesome plugin!
 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-ip-for-http-request/#post-16927056)
 * In the next release, there will be a “Custom HTTP headers” field in the “Advanced
   Options” section where the user can configure the profiler to send some specific
   HTTP headers. I made some tests and noticed that it could be used to solve your
   problem easily:
   Assuming the domain is “example.com”, the page to profile [https://example.com/foo/](https://example.com/foo/)
   and the new server IP address 1.2.3.4, all you will have to do is to enter https://**
   1.2.3.4**/foo/ in the Custom URL field and, in the new “Custom HTTP headers” 
   field, “Host: example.com”. The profiler will connect to 1.2.3.4 and request 
   the /foo/ page from the “example.com domain.
 *  Thread Starter [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-ip-for-http-request/#post-16929094)
 * Thank you very much! I will try this out
 *  Thread Starter [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-ip-for-http-request/#post-16942564)
 * Would it be possible for you to share the patch early via an alternate download
   link?
 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-ip-for-http-request/#post-16943617)
 * Version 1.6.4 was released today.
 *  Thread Starter [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-ip-for-http-request/#post-16943837)
 * Works perfect thank you!

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

The topic ‘Set IP for HTTP request’ is closed to new replies.

 * ![](https://ps.w.org/code-profiler/assets/icon-256x256.png?rev=3143506)
 * [Code Profiler - WordPress Performance Profiling and Debugging Made Easy](https://wordpress.org/plugins/code-profiler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-profiler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-profiler/)
 * [Active Topics](https://wordpress.org/support/plugin/code-profiler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-profiler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-profiler/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/set-ip-for-http-request/#post-16943837)
 * Status: resolved