Mobile app version of vmapp.org
Login or Join
Smith883

: Would having a './' in a URL cause any trouble with search engines? For code simplicity, some of my URLs in my website might contain a ./ For example: www.example.com/./something The ./

@Smith883

Posted in: #SearchEngines #Seo #Url

For code simplicity, some of my URLs in my website might contain a ./

For example:


example.com/./something

The ./ is automatically stripped-out by the browser, and the resulting URL is:


example.com/something

My question is: could such URLs cause any trouble? Will search engines be able to correctly resolve these URLs?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Smith883

2 Comments

Sorted by latest first Latest Oldest Best

 

@Cofer257

No they will not cause any issues (nor do you need to do any kind of redirect). RFC 3986 (the official URI spec) specifies a "Reference Resolution" section which states any path segments (between slashes) containing only dots should be removed. Single dots are removed entirely while double dots essentially remove the previous directory from the URL.

Also note that no file system in popular use (Windows/Mac/Linux) allows a filename composed of just dots so a URL containing /./ doesn't really make sense.

In short, when any user agent (browser or search engine) sees a URL containing a single dot it won't ever request that URL, it will request the "proper" one.

10% popularity Vote Up Vote Down


 

@Rambettina238

Ideally you will have a rewrite rule that will strip it out by doing a permanent redirect (301). That way, These URLs will never be resolved, only the correct one.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme