Problem after connecting a custom domain to Divhunt

Hi,

I have connected my website to a custom domain.

The domain was connected before to a service that can shrink addresses to with custom domain.

I still need to do that.

For example to take a Facebook link and to have my custom domain address to it.

Now, all the custom links from the other service are unavailable.

What can I do now?

How can I connect my domain to Divhunt and still use the service to make short custom links with my domain?

Hey, those services should continue working normaly, they are just redirecting to the domain which is now pointing to Divhunt?

Hi Stefan

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?

For example a facebook link to mydomain.com/short

Dont understand? If you need your-domain.com/short just create the new page in builder with /short slug :slight_smile:

Once you will connect properly the project with your domain provider it will works like a charm.

@Stolichnaya

Do you mean if you want your website to have a prefix, like to start with /short, and all other pages to have /short prefix in route?

If yes, that’s possible.

There is no way to connect root domain to different services such as Divhunt and other service.

All I need is to be able to use Divhunt and to be able to create shorter links with my domain.

Such an example is that I take a Facebook post link and shorter it to mydomain.com/facebook-post

Can I do that with Divhunt?

@Stolichnaya

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.

Hi Dejan

I only want to redirect links with my domain such as bit.ly

How can I do that with divhunt?

For example, if I take a link for my WhatsApp number which is https://wa…me/message/AHONOG3Lfhg, I create a link such as mydomain.com/connect-us

Thanks for your reply :pray:

@Stolichnaya

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)

I am not sure what you mean.

Can you explain with images about the process you asked me to do?

Thanks a lot for helping

@Stolichnaya

You need to store those url shortener links in Collection (CMS) first.

Like you are storing Blog posts or similar, in same way we need to store the links for URL shorteners in Collections.

So you need to create new collection where you’ll add those links, have you used Divhunt CMS yet?

No, I haven’t used the CMS before.

Do you have a tutorial on how to create a new collection first?

@Stolichnaya

Send me your domain name, I’ll create it out for you this time since we don’t have tutorials for Workflows yet and document the steps here.

Ok, thanks a lot!

I sent you in the private chat

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.

  1. 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.

  2. 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.

  1. Add as many links as you need, with unique name and link to website. I’ve added facebook as example.

  1. 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)).

  1. 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.

  1. We need to get a Collection item by slug, where the slug is found in route, and we want to stop workflow if item wasn’t found.

  1. Last step is to redirect the user to a link from the CMS item.

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

I love you Dejan :kissing_heart:

I am trying to reconfigure it by myself and I am stuck on Conditions stop if.

I don’t have the custom part you have so I can’t choose the route

How can I add the route section to the variable?

Yours:

Mine without the custom part:

Also, Can I create the link without the “go” inside of it?

Like that?

Great Tutorial!

@Stolichnaya

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.

Hi Dejan

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?

@Stolichnaya

I’ve removed /go then
image

And second action IF, we need to remove also check for /go so it doesn’t stop workflow.

Works now without /go