Hey there,

i have just managed to migrate all my applications and domains from Webfaction to here and i m wondering about Redirecting.
On Webfaction:
I have multiple domains, that are being redirected to multiple external Cname domains.

I have read the tutorial for Redirecting here https://help.opalstack.com/article/86/site-domain-redirects
but should i then create a new Application for each redirection i need ?

Thanks

  • sean replied to this.

    Thanks for the quick reply 😄 Very pleased with the service.
    Under the Priority and TTL i left everything as standard.
    is there anyway to test if everything would be working fine, since i cant afford to change the NS without making sure that something doesnt go wrong ?

    • sean replied to this.

      twiago is there anyway to test if everything would be working fine, since i cant afford to change the NS without making sure that something doesnt go wrong ?

      You can query our NS directly to ensure that your CNAME records are ready prior to cutting your NS over. If you want to do that:

      1. Log in to your Opalstack server as one of your shell users. (You can skip this step if you have the dig utility installed locally on your own computer.)
      2. Run the following commands, changing "domain.com" to the domain or subdomain that you are checking:

        DOMAIN=domain.com
        for ns in ns{1..3}.de.opalstack.com; do
          echo $ns
          dig +short CNAME $DOMAIN @$ns
          echo ""
        done

      The output will show the name of each Opalstack NS followed by the value of the CNAME record.

      12 days later

      Hey Sean,

      i have a quick question, since i m really not good with the Network Configuration :
      I have updated my Cname Records for multiple domains that were running like that on webfaction and with your command lines i did get the right CNAME Record for each one of the individual Domains.
      At the same time i manipulated my hosts File on my Mac and could see my main Site through the Opalstack IP Adresse, but when it comes to the domains that should be redirected it doesnt work, i always get a 404 nginx Error.
      Is it because CNAME Record let the Domain run under another IP Adresse, which i conflict with my host file manipulation ?
      If this was the case, that means, after making sure that the domains points to the right CNAME Records with your Command lines, after a switching the NS it should almost 100% definitely be working ?

      Regards
      Thanks

      • sean replied to this.

        twiago our web server configuration uses domain-based virtual hosting so your CNAME domains will be 404 unless you have a site configured for them.

        Like I mentioned earlier, a CNAME and a redirect are two completely different things. If you want to redirect web traffic for one domain to another domain, then you must use a HTTP redirect.

        Here's how:

        1. Go to https://my.opalstack.com/apps/ and click "Create Application".
        2. Enter an app name like "mysite_redirect" (ignore the placeholder text that reads "username", we'll have that fixed soon).
        3. Select "PHP-CGI with Apache" as the app type (so we can use .htaccess later).
        4. Select the shell user that currently serves the apps on domain.com.
        5. Click the "Create Application" button and wait a few seconds for the app to be created.
        6. Create a file /home/shelluser/apps/mysite_redirect/.htaccess (replace shelluser with your own) with the following contents:

          RewriteEngine on
          RewriteRule ^(.*)$ https:/domain.com/$1 [R=301,L]
        1. Go to https://my.opalstack.com/domains/ and click the green "Add Site" button at top of the page
        2. Click the purple "Route Domain" button to add each of the domains that you want to redirect to domain.com.
        3. Select your "my_redirect" app from the list.
        4. Enter / in the field next to the selected application.
        5. Click the green "Add site" button to save your changes.

        Your redirect should begin working a few seconds after you complete those steps.

        Hope this helps!

        I m not sure exactly which way to use right now, but on Webfaction i have a domain "control.mydomain.com", uses a Cname hosting "control.anotherDomain.com" , which way should i chose to re create this on opalstack ?

        I m sorry but i m trying to avoid any fatal mistakes, that s why i m asking in this way now

        Thanks

        • sean replied to this.

          twiago

          Assuming that both domains are hosted at Opalstack and control.mydomain.com has a CNAME pointing it at control.anotherDomain.com:

          1. Create the main website for control.anotherDomain.com.
          2. Create the redirect website as described for control.mydomain.com.

          If that doesn't seem to help then please email support@opalstack.com with the exact domain names so that we can look at your setup and provide better guidance, thanks.

          Mastodon