How to get currently website link? Because not work repl.co now for checking website

How to get latest website

Because this not work

const url = `https://${process.env.REPL_SLUG}.${process.env.REPL_OWNER}.repl.co`;
console.log(url);

repl.co does not exist anymore. You can view more info here Changes to Hosting on Replit!

const url = `https://${process.env.REPL_ID}.${process.env.REPLIT_CLUSTER}.replit.dev`;

But there are some other characters in the middle (between repl id and .) & I’m not sure what they are, so this doesn’t work. I’ll look into it.

Edit: those other characters just seem to be random. I don’t know how you’d find this.

The easiest way to get it would probably be location.href in vanilla JS.

2 Likes

Hey @SECRETHUMANCHOR, If you want a simple way of getting the link. Open the site in a new tab and then copy the link. WARNING. If you have not deployed the app you will get a replit.dev link. To get a permanent link you will need to deploy the app.

Those characters are -00 when you create a repl for the first time, but after they are -00-dahbidsbc

Weird

I wanted testing with console show link

Ah sorry then you will want to do what @QwertyQwerty88 said.