Developer forum

Forum » CMS - Standard features » Homepage still using /Default.aspx despite URL settings

Homepage still using /Default.aspx despite URL settings

Ferri Halfhide
Reply

Hello!

I have a question regarding the URLs on my Dynamicweb site.

I’ve set up a website, but the homepage is always being linked as [domain]/Default.aspx. When I check the SEO statistics, this page also receives the highest number of visits.

However, in the Settings > Customized URLs, I have explicitly configured the system to use “Location and page name” for URLs (see screenshot).


So I’m expecting friendly URLs like [domain]/home, not /Default.aspx.

My question is:

Why is the system still using /Default.aspx as the homepage URL, even though I have configured the URL settings differently?

Thanks in advance for your help!


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Ferri

Under the hood, the friendly urls are all running under /default.aspx?ID={pageid}. Setting up the customized urls, will hide default aspx.

  • On your website settings ensure you have the domain in the list of domains
    • Consider setting the primary domain
    • If you set primary domain, under website settings you can set "Link frontpage to /"

In settings under the customized urls, you can also try to enable this setting:

That setting will redirect requests to /Default.aspx?ID={pageid} to the friendly url.

See if these changes will help on your problem.

You can also provide a link to the solution for me to explore.

 
Ferri Halfhide
Reply

Hi Nicolai,

Thank you for your response. Unfortunately, the suggested solution didn’t resolve the issue.

I’m still seeing the /Default.aspx?ID={pageid} URL when clicking on “Show page” — for example, on the homepage.

Additionally, when performing searches, the results still point to Default.aspx.

When checking the page visit statistics, we also notice that search traffic goes to /Default.aspx instead of the clean, default page URL.

Here is the link to the staging environment:  https://bluedrops.staging.dynamicweb-cms.com/

Thanks in advance for your help!

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

I think that's because you're logged in to the backend. Try incognito and remove purge=true (which is added in the backend only); does that fix it?

Imar

 

 
Ferri Halfhide
Reply

Hi, 

You are right, when i remove the purge=true then it works fine. 
But still, in incognito, when doing a search for a product, the /Default aspx is still shown: 

Kind regards,

Ferri

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Is that because of redirect=false from in the query string? Not sure if that's coming from Swift, and why it's there.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

it is because it is in the search form.

The latest release of that form has changed behavior to use the search friendly url instead of the non friendly.

You can either upgrade Swift - or this template from here: https://github.com/dynamicweb/Swift/blob/v1.26.8/Swift/Files/Templates/Designs/Swift/Paragraph/Swift_SearchField.cshtml#L37

Or change the marked line below in the /Files/Templates/Designs/Swift/Paragraph/Swift_SearchField.cshtml template:

(Remove the grey line and add the one just below)

string shopPage = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl($"Default.aspx?ID={GetPageIdByNavigationTag("Shop")}");

Votes for this answer: 1

 

You must be logged in to post in the forum