Title: Remove the second step of redirect when using web.config for HTTPS?
Last modified: September 6, 2018

---

# Remove the second step of redirect when using web.config for HTTPS?

 *  Resolved [baumgardc](https://wordpress.org/support/users/baumgardc/)
 * (@baumgardc)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/remove-the-second-step-of-redirect-when-using-web-config-for-https/)
 * I am trying to remove the multiple redirects if possible. I have my web.config
   setup to direct all urls to [https://www](https://www).
    What I am running into,
   is that when using redirection for page urls, it is adding that extra step. Here
   is an example of the flow if I setup a redirect from ‘page5’ to ‘page6’. 1. Enter
   url: [http://example.com/page5](http://example.com/page5) 2. Redirect: [https://www.example.com/page5](https://www.example.com/page5)
   3. Redirect: [https://www.example.com/page6](https://www.example.com/page6)
 * Is there any way to skip step 2 and redirect directly to the final destination(
   3.)?

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

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/remove-the-second-step-of-redirect-when-using-web-config-for-https/#post-10669369)
 * I’m not really sure what you mean in your example, but if you set the target 
   to include [https://www](https://www) then it will match your web.config
 *  Thread Starter [baumgardc](https://wordpress.org/support/users/baumgardc/)
 * (@baumgardc)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/remove-the-second-step-of-redirect-when-using-web-config-for-https/#post-10673956)
 * When I add the full URL to the target field, it just changes it to a relative
   URL.
    So I have the following. Source URL | /denton Target URL | /denton-dallas-
   fort-worth
 * If I put the full URL,
    Target URL | [https://www.example.com/denton-dallas-fort-worth](https://www.example.com/denton-dallas-fort-worth)
   it changes once saved, back to /denton-dallas-fort-worth.
 * When I run a redirect checker, my results are:
    [http://example.com/denton](http://example.com/denton)
   301 Moved Permanently [https://www.example.com/denton](https://www.example.com/denton)
   301 Moved Permanently [https://www.example.com/denton-dallas-fort-worth](https://www.example.com/denton-dallas-fort-worth)
   200 OK
 * What I want is to avoid that middle redirect. I want to go straight to the final
   redirect.
 * Thank you for the help.
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/remove-the-second-step-of-redirect-when-using-web-config-for-https/#post-10674390)
 * It shouldn’t remove the domain from your target, only your source. Do you have
   a real URL I can test with?
 *  Thread Starter [baumgardc](https://wordpress.org/support/users/baumgardc/)
 * (@baumgardc)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/remove-the-second-step-of-redirect-when-using-web-config-for-https/#post-10674566)
 * [http://littleguys.com/denton](http://littleguys.com/denton)
    [https://littleguys.com/denton](https://littleguys.com/denton)
   [https://www.littleguys.com/denton-dallas-fort-worth](https://www.littleguys.com/denton-dallas-fort-worth)
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/remove-the-second-step-of-redirect-when-using-web-config-for-https/#post-10676002)
 * I don’t think the redirect from [http://littleguys.com/denton](http://littleguys.com/denton)
   => [https://littleguys.com/denton](https://littleguys.com/denton) is caused by
   Redirection. Your server is probably doing this before Redirection has a chance.
 * You mention web.config, so I think that means you are using a Microsoft server?
   I would normally suggest saving your redirects to .htaccess, but I’m not sure
   how this would work in your situation.
 *  Thread Starter [baumgardc](https://wordpress.org/support/users/baumgardc/)
 * (@baumgardc)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/remove-the-second-step-of-redirect-when-using-web-config-for-https/#post-10677230)
 * Correct. This is on Windows Server, and I am using web.config to redirect all
   to [https://www](https://www).
    I suppose because it is redirecting first on 
   the server, the only way to do it and skip that middle redirect is to explicitly
   define each redirect in web.config.
 * Unless you can come up with another idea for me, I don’t know that there is another
   way to reach it like that. I appreciate your help.
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/remove-the-second-step-of-redirect-when-using-web-config-for-https/#post-10677995)
 * If it’s being handled by your server then there’s not much you can do in Redirection
   to work around it. On Apache or Nginx you’d be able to use Redirection to save
   an appropriate redirect file, bypassing this kind of problem, but it doesn’t 
   support Windows Server.

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

The topic ‘Remove the second step of redirect when using web.config for HTTPS?’ 
is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [John Godley](https://wordpress.org/support/users/johnny5/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/remove-the-second-step-of-redirect-when-using-web-config-for-https/#post-10677995)
 * Status: resolved