Forums

Redirecting to my application (PAW free account)

Hi everyone. I've set up a web2py application here and I'm trying to figure out if it's possible (or permissible) to redirect my domain (eg: example-domain.cu.cc) which is a root domain at the cu.cc registrar, to my web app. What are the general steps to take if this can be done?

I've searched the forums here but the process is kind of hazy.

Note: my registrar seems to accept both the www subdomain and the root domain alike.

Hi yousuf -- if you want to set up your domain so that when someone visits example-domain.cu.cc they get redirected, and the URL in the browser's address bar changes to your free PythonAnywhere account's URL yousuf.pythonanywhere.com, and they can use your app, then that's absolutely fine with us. It's something you'd need to set up with your registrar; they'll probably call it something like "Web forwarding" or "HTTP redirect".

Ok, I've set up the redirect, weirdly however, the URL in the address bar stays exactly the same even when browsing different pages in the app. I'll cancel it. Thanks for answering, giles.

Ah, I think I know what that will be. Some registrars offer a thing they call something like an iframe-based redirect. That works by them running a simple server on your domain, that, when someone visits it, returns an HTML page that fills the browser window with an iframe. The iframe gets its contents from the place you specify (in your case, your PythonAnywhere app). So it looks a bit to the user like your app is running on your domain, right up to the point when they click a link inside the iframe. When they click the link, the stuff displayed inside the iframe updates with the new contents so they see a new page, but because the top-level page is still the same one -- the one that contains the iframe -- then the URL in the address bar doesn't update.

Personally I think they're a pretty horrible compromise -- yes, you get the right domain in the address bar when your user arrives on your site, but the fact that it doesn't update thereafter is likely to confuse them.

I should add -- if they offer several different types of redirect, then one of the others might help. If you like, you can list which ones they offer here and I can help you pick an appropriate one.

Thanks giles, very interesting, I'll also note that in the page source, I can see the PAW URL.

URL Forwarding contains basically just one option, here's the whole interface in a nutshell:

  1. "URL Forwarding" this contains the fields: Target URL, Title, Description, keywords, Revisit, Robots....... I only needed to set up the Target URL, the rest are related to search engine indexing and such, no mention of any types.

  2. "Nameserver", which lists nameserver fields; 1,2,3,...

  3. "Zone Records", record types are (A, CNAME, MX, NS, SOA, TXT).

The first option, which is a simple redirect, takes effect immediately, the other two take up to 48 hours.

Right, those sound like pretty standard options. Just to double-check -- was it URL forwarding that you were doing previously?

Yes. That's why it seemed strange. It's the default/only behavior apparently.

Very weird. Out of interest, which registrar was this?

www.registry.cu.cc

The domains are free, so I took the liberty to register a few, for personal use.

I was looking it up, I found a name for it; "URL Cloaking" or "URL Masking". This is probably be the common name for what you described technically.

Ah right, yes, those names are familiar now you mention them. Definitely a bad thing, anyway, from the confusing-your-users perspective.

Just technically though, would you permit something like this on your domains?

Having asked that, I also think this is pretty bad for the majority of websites that are more than just a couple of pages.

Sure, we've no problem with it.