The problem is that there are 2 A records to different services so it has to be only one for it to work.
So at the moment it works sometimes when it chooses a random A record.
The only way I see is to create a subdomain for the link shorting service.
Is it possible to create a custom link with divhunt without creating a page?
That link /facebook-post, what does it opens? Does it open your website, or some else service? If other service, does it just redirects to it, or it opens it like it’s your website?
If you want to create URL shorteners, like you can define links on your website domain.com/facebook that redirects to facebook, that’s possible.
If you want to load another service in your domain, let’s say you want to run even Webflow on your domain on route domain.com/webflow, that’s possible only if you configure your own server instance in front of Divhunt and configure 2 routes, once which will load Divhunt and second which will load Webflow and so on.
Create collection “Links” or similar, which has only field “Link” text type.
Create items as many as you need, like for whatsup, facebook, etc, then provide me with your domain so I can record you short video how to achieve this, (I’ll create it on your domain, but want to record video so you can understand for the next time, or if someone else is reading this)
So this is the idea, we store links in database (Collections can act as database), and then use use Workflows to detect the URL of website if is something like /go/facebook, which will get the link of facebook from database and redirect to the link.
Install application “Collections” from admin panel > browse applications. CMS can be used as database in Divhunt, which we need in this case, to store the links somewhere.
Create new Collection and configure necessary fields. In this case we only need 1 field with text type for storing the Link, and each collection comes with predefined fields name and slug so we can use those for short name of URL.
From the top right navbar, there’s workflows, open, and create new Workflow with event Visitor Load (meaning that workflow will be runned on each visitor website visit (so no admin will count)).
We need to build a dynamic route so we can extract the data from the route, like slug, and then we want to stop the Workflow execution if the hit route is not /go/:slug where :slug can be anything. For this we can use IF condition action and ROUTE action which extracts the route from URL.
Publish workflow and now you can test is:
your-domain/go/facebook
If you add more items to CMS, for example instagram, then it will automatically work
your-domain/go/instagram
This is a super basic example to give you an idea of what I’ve done, there’s a lot more to it. But I don’t want to lose time here since we will record videos.
I’ve already implemented this on your website, so no further action needed from you except to add more links in Collection
That’s why I said let’s wait for tutorials which will explain how Workflows work. But the reason why you don’t have a custom part is because you haven’t run the workflow yet at least once, you need to run it in order to get custom data/variables.
And to run it either publish it, or just go to the website and add in url ?workflows=run which will run all workflows even non-published, or ?workflows=ID-OF-WORKFLOW, which will run only that workflow with sent ID.
So basically every time you add some action, workflow should be executed in order to get new variables and see what’s going on. And as well you can also have urls like ?workflows=run&debug=true to see the workflow data execution what’s happening etc.
But as I said, you should wait for a video which will explain all this in a much easier way.
As for the without /go/, you can, but then workflow will run on every page on your website, which will put unnecessary load for no reason, since it needs to fetch the CMS item, so it’s much better option to have /go or similar, /g/, /something in front so workflow can be stopped if the route didn’t match.
However in this case, it’s not big of a deal, since like url shortener is easy and fast workflow so it can be executed on every site request without any issue.
Also not sure if you got this, but I already made everything working on your website, so you don’t need to recreate.
I have tried to recreate it because I used the shorter links for a while without the “go” and customers already know it so I need to create the shorter links without it.
I have tried to remove the “go” from the workflow that you configured but it doesn’t work without it.
How can I achieve that in the workflow you have configured?