Developer forum

Forum » Feature requests » Force absolute URL

Force absolute URL

Nuno Aguiar
Reply

Hi,

 

Following Google's suggestion that URLs should be absolute Dynamicwe could have an option in the website settings to add the domain to the friendly URL (based on the primary).

Currently Dynamicweb requires relative paths to generate the Friendly URLs (understandable), but if we wanted to control that, there's a "lot of work" involved in Razor.

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Høeg Pedersen
Reply

I've never read that before. Could you provide a link to Googles recommendation please?

BR Nicolai

 
Nuno Aguiar
Reply

Hi Nicolai,

 

In https://support.google.com/webmasters/answer/139066?hl=en&rd=1 you can find under "Indicate the preferred URL..."

Avoid errors: use absolute paths rather than relative paths with the rel="canonical" link element.

 

It is not a critical issue, but it is a guideline. Right now we would have to do get the FriendlyUrl from the API and append the prefered domain, but if the built-in feature of the url replacement were to do it based off the primary domain, would be nice.

 

Best Regards,

Nuno Aguiar

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

The way I read that, it only applies to the link element with rel=canonical. Since that should only appear once, you can simply output the curent domain in that hef, no?

Imar

 
Nicolai Høeg Pedersen
Reply

I agree with Imar...

 
Nuno Aguiar
Reply

Hi,

 

Alright then, so it's a non issue. Thanks for the input