ucsb / webguide

Repository for the UCSB WSG Webguide hosted on Github using Jekyll.
https://webguide.ucsb.edu
BSD 3-Clause "New" or "Revised" License
7 stars 7 forks source link

Migrate "URLs" Page #411

Closed loganfranken closed 3 years ago

loganfranken commented 3 years ago

384

Legacy Page https://webguide.ucsb.edu/urls/

Location in New Hierarchy ???

All of this information still seems relevant.


Use "friendly", persistent URLs throughout your application.

Friendly URLs

A "friendly" URL provides a clear description of a resource. For example, the following URL clearly describes the page the user would access:

# GOOD PRACTICE
https://department.ucsb.edu/staff/john-smith

In contrast, the following URL is more cryptic:

# BAD PRACTICE
http://department.ucsb.edu/page.php?id=63&staff=john%20smith

"Friendly" URLs are more accessible to both the users visiting the URLs as well as search engine crawlers attempting to index your website. Use the following recommendations to create friendly URLs:

Persistent URLs

A persistent URL indefinitely directs a user to a particular web page.

It's important to maintain persistent URLs as users may have bookmarked a page from your website or another website may be linking to your website. If you "break" this URL by moving or removing the page to which the URL points, you create a poor experience for the user.

If a URL must change, be sure to redirect users who visit the existing URL. If a resource has been permanently moved, respond with the "301" HTTP status code:

HTTP/1.1 301 Moved Permanently

If a resource has only been temporarily moved, respond with a "307" HTTP status code (or "302" for HTTP 1.0):

HTTP/1.1 307 Temporary Redirect

Third-Level Domain Names

Websites should be available via both their specific third-level domain name (e.g., https://department.ucsb.edu) and the WWW domain (e.g., https://www.department.ucsb.edu), so that users may access a site using either URL.

rvizena commented 3 years ago

made a new page for 'Domains and URLs' to incorporate this info. https://dev-webguide-ucsb-edu-v01.pantheonsite.io/development/domains-urls