What is the best way to handle special characters in URLs
-
What is the best way to handle special characters? We have some URL's that use special characters and when a sitemap is generate using Xenu it changes the characters to something different. Do we need to have physically change the URL back to display the correct character?
Example:
URL: http://petstreetmall.com/Feeding-&-Watering/361.html
Sitmap Link: http://www.petstreetmall.com/Feeding-%26-Watering/361.html
-
As far as "search-engine-spider-stoppers" does this also go for "%" in on-page copy?
-
Hi there,
The special characters on your website URL is changed because URLs are sent over the Internet using the ASCII character-set. That's why the & is converted to %26.
If you're trying to make your site rank, it is better to just simplify or shorten the URL. This is because search engines have problems indexing sites when the URLs contain special characters.
The special characters below are known to be "search-engine-spider-stoppers":
- ampersand (&)
- dollar sign ($)
- equals sign (=)
- percent sign (%)
- question mark (?)
Hope that helps!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Forwarded vanity domains, suddenly resolving to 404 with appended URL's ending in random 5 characters
We have several vanity domains that forward to various pages on our primary domain.
Intermediate & Advanced SEO | | SS.Digital
e.g. www.vanity.com (301)--> www.mydomain.com/sub-page (200) These forwards have been in place for months or even years and have worked fine. As of yesterday, we have seen the following problem. We have made no changes in the forwarding settings. Now, inconsistently, they sometimes resolve and sometimes they do not. When we load the vanity URL with Chrome Dev Tools (Network Pane) open, it shows the following redirect chains, where xxxxx represents a random 5 character string of lower and upper case letters. (e.g. VGuTD) EXAMPLE:
www.vanity.com (302, Found) -->
www.vanity.com/xxxxx (302, Found) -->
www.vanity.com/xxxxx (302, Found) -->
www.vanity.com/xxxxx/xxxxx (302, Found) -->
www.mydomain.com/sub-page/xxxxx (404, Not Found) This is just one example, the amount of redirects, vary wildly. Sometimes there is only 1 redirect, sometimes there are as many as 5. Sometimes the request will ultimately resolve on the correct mydomain.com/sub-page, but usually it does not (as in the example above). We have cross-checked across every browser, device, private/non-private, cookies cleared, on and off of our network etc... This leads us to believe that it is not at the device or host level. Our Registrar is Godaddy. They have not encountered this issue before, and have no idea what this 5 character string is from. I tend to believe them because per our analytics, we have determined that this problem only started yesterday. Our primary question is, has anybody else encountered this problem either in the last couple days, or at any time in the past? We have come up with a solution that works to alleviate the problem, but to implement it across hundreds of vanity domains will take us an inordinate amount of time. Really hoping to fix the cause of the problem instead of just treating the symptom.0 -
URL structure - which one is better?
We are creating a new website and got stuck while deciding the URL structure. Our concern is which url is better in terms of SEO i.e. pune.fabogo.com/spa or fabogo.com/pune/spa and why. Also which one would rank faster if someone searches for **spas in pune if both **pages are same.
Intermediate & Advanced SEO | | fabogo_marketing0 -
URL mapping for site migration
Hi all! I'm currently working on a migration for a large e-commerce site. The old one has around 2.5k urls, the new one 7.5k. I now need to sort out the redirects from one to the other. This is proving pretty tricky, as the URL structure has changed site wide. There doesn't seem to be any consistent rules either so using regex doesn't really work. By and large, the copy appears to be the same though. Does anybody know of a tool I can crawl the sites with that will export the crawled url and related copy into a spreadsheet? That way I can crawl both sites and compare the copy to match them up. Thanks!
Intermediate & Advanced SEO | | Blink-SEO0 -
URL Structure
URL i have to use targeted keyword on all sub page domain or not for example now i am using url like this format fundingtype.html litigation-funding.html legal-funding.html financingservices.html process.html and if i re-write all url with targated keyword like this format lawsuit-loans-fundingtype.html lawsuit-loans-litigation-funding.html lawsuit-loans-legal-funding.html lawsuit-loans-financingservices.html lawsuit-loans-process.html so which type URL are more effective for best SEO ??
Intermediate & Advanced SEO | | JulieWhite0 -
Best way to duplicate a wordpress site for staging purposes?
I want to make some changes to my Wordpress site, and want to somehow set up a live staging area. Does anyone know of a good way to do this? I want all of the same content there I just want to be able to make changes to it and try it all out before going live. Any thoughts on this? Also I want to be sure the staging site doesn't get indexed since it will be a complete duplicate of my existing site. Thanks!
Intermediate & Advanced SEO | | NoahsDad0 -
Optimal URLs for SEO and UX
We are considering restructuring the URL scheme on one of the websites we maintain. We have a few options. Currently news article URLs are as follows:
Intermediate & Advanced SEO | | Peter264
http://domain.com/news/1234/article-title-name/ Download section URLs are as follows:
http://domain.com/downloads/files/1234/file-title-of-download-here/ Forum URLS:
http://forum.domain.com/forum/topic/1234/title-of-forum-topic-here/ We feel that these are a bit too long for both SEO and user experience. We want to remove as many directories from the URLs as possible. From experience, what do you recommend changing for the example URLs above? We have some ideas below...and we need to keep the ID in the URLs...however I know this is a little frustrating. Some ideas we have for news articles:
http://domain.com/news/article-title-shorter-1234
http://domain.com/article-title-shorter-n1234 Some ideas for the download pages:
http://domain.com/downloads/file-title-shorter-d1234
http://domain.com/downloads/files/file-title-shorter-1234
http://domain.com/file-title-shorter-d1234 Some ideas for the forum URLs:
http://forum.domain.com/topic-title-shorter-t1234
http://forum.domain.com/topic/topic-title-shorter-1234 What do you think of these suggestions? Any other URL ideas? Recommended URL length? The purpose of is question was to find the perfect URLs for the site we are working on; your thoughts, suggestions and tips are very much appreciated.0 -
What are the best way to get a new subdomain ranked properly
Our main site (blog with 700 high quality articles) ranks pretty well and we recently launced a rapidly growing forum (55.000 posts in the first 11 weeks) on a subdomain. What would be a good strategy for ranking the forum quickly
Intermediate & Advanced SEO | | xpd1 -
What is the best way to embed PDF documents for SEO?
I have been using SCRIBD to embed PDF documents on my site but until recently I did not include the link back to SCRIBD. Will my site get credit for this content or will it go to SCRIBD? Is there a better way to embed PDF documents for SEO?
Intermediate & Advanced SEO | | casper4340