Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Managed)
  3. Shutdown Wordpress instance and redirect all traffic to other website

Shutdown Wordpress instance and redirect all traffic to other website

Scheduled Pinned Locked Moved Solved WordPress (Managed)
9 Posts 4 Posters 421 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    p44
    translator
    wrote on last edited by
    #1

    Dear all,

    I have to shutdown a Wordpress instance and I don't want users see «You are seeing this page because the DNS record of mydomain.com is set to this server's IP but Cloudron has no app configured for this domain».

    How I can shutdown instance and redirect all traffic to other website? Eg. mydifferentdomain.com.

    Thank's a lot 🙏

    alt text

    1 Reply Last reply
    0
    • necrevistonnezrN Offline
      necrevistonnezrN Offline
      necrevistonnezr
      wrote on last edited by
      #2

      How I did it (if I understand you correctly):

      • Changed Domain of the Wordpress instance from wordpress.domain.com to wordpressold.domain.com
      • Stopped the Wordpress instance
      • Installed Surfer at wordpress.domain.com with an index.html (which can redirect)
      P 1 Reply Last reply
      3
      • necrevistonnezrN necrevistonnezr

        How I did it (if I understand you correctly):

        • Changed Domain of the Wordpress instance from wordpress.domain.com to wordpressold.domain.com
        • Stopped the Wordpress instance
        • Installed Surfer at wordpress.domain.com with an index.html (which can redirect)
        P Offline
        P Offline
        p44
        translator
        wrote on last edited by p44
        #3

        @necrevistonnezr Thank's a lot, this is a good idea but you've to keep an instance (Surfer) always active, right?

        necrevistonnezrN 1 Reply Last reply
        1
        • P p44

          @necrevistonnezr Thank's a lot, this is a good idea but you've to keep an instance (Surfer) always active, right?

          necrevistonnezrN Offline
          necrevistonnezrN Offline
          necrevistonnezr
          wrote on last edited by
          #4

          @p44 Yes, the Surfer instance would remain active (but is super light-weight). However, there might be better ways to do this on a DNS / domain level(?)

          1 Reply Last reply
          3
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #5

            If the other website is also on Cloudron, then you can configure a redirect for that app from the original domain https://docs.cloudron.io/apps/#redirections

            P 1 Reply Last reply
            2
            • nebulonN nebulon marked this topic as a question on
            • nebulonN nebulon

              If the other website is also on Cloudron, then you can configure a redirect for that app from the original domain https://docs.cloudron.io/apps/#redirections

              P Offline
              P Offline
              p44
              translator
              wrote on last edited by
              #6

              @nebulon Thank's a lot Nebulon, I was evaluating this solution as first approach, but I should keep the instance, even off, and not delete, right?

              Also, I tried to configure the redirect on domain hosted on the same Cloudron instance, but system does not allow me to configure redirect, from domain.com to newdomain.com (without any www or subdomain), as per this screenshot:

              alt text

              1 Reply Last reply
              0
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #7

                The way it works, is that you configure the redirect at the app where the domain should redirect to. The old wordpress instance has to be moved to some other placeholder domain, then it can be stopped.

                1 Reply Last reply
                3
                • P Offline
                  P Offline
                  p44
                  translator
                  wrote on last edited by
                  #8

                  @nebulon Thank's a lot, it works like this, but the old url www.example.url/link-1 will redirect to www.newexample.url/link-1 and not to www.newexample.url.

                  1 Reply Last reply
                  0
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #9

                    @p44 You can do this in a few ways, depending on your use case:

                    • With surfer, you can use create a 404.html . In javascript, use something like https://stackoverflow.com/questions/20077103/page-redirect-with-path-using-javascript . Here's an ultra basic 404.html:
                    <html>
                        <script>
                            window.location = "https://cloudron.io";
                        </script>
                        <body>
                            Not found
                        </body>
                    </html>
                    
                    • Another idea is to use the LAMP app and configure apache to redirect using redirect rules.

                    When to use which? Off my head:

                    • Use surfer, if you want to show a page which has the classic "redirecting in 3..2..1".
                    • Use lamp, if you want to redirect asap. This also does redirect at http level. So, a brower can potentially cache/remember this information and will be faster for future access (but with the danger that it will not hit your site anymore).
                    1 Reply Last reply
                    1
                    • P p44 has marked this topic as solved on
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search