Encoding Apostrophes in HTML
-
One question I have recently been pondering is that the use of apostrophes in ALT attributes and anchor text seems to cause some erratic results from the 'Fetch as BingBot' tool... GWT doesn't color code the results so i only notice it with BingBot, although i can't necessarily tell that it causes any negative effects. My rankings on Bing are erratic though so who knows...
Should I encode apostrophes as ' when i use them in html? Or will it not really matter?
-
Unless you're trying to rank for something with an apostrophe in the query, it won't really matter.
If you are trying to rank for something with an apostrophe in the query, some searches with and without the apostrophe show that it matters a bit. You can just use the text ' , as both search engines have shown that they understand it. As long as it renders that way in your CMS (you can turn off images to check) you're fine.
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
-
How do I canonicalize an old HTML static site?
Hey All, I have an old static HTML site, and the crawl errors are showing "http://www.website.com" and http://website.com" as the two separate pages because there is no canonicalization. Can I fix that with a rel="canonical" tag? There is just a folder of HTML files to add the tag to, so if the www. version is the true version, can I just add to all the pages? Or is there a better way to do this??
Intermediate & Advanced SEO | | mbodine0 -
Help.. there was a html and php version of my home page on my server for about a week. Now lost all rankings!
Our home page has disappeared from the Google SERPS completely. It won't even show for a search of our business name although other internal pages appear. Site appears in bing for our keywords but not for our business name. When I republished the site I got a message saying there was a php and html version of the site on the home page. I deleted this immediately but was then advised by another staff member that they had also got that message the week before but not done anything about it - so I think it was out there for about a week. Could this be the cause of the ranking drop? We have also done the following: Checked GWM for robots issue, manual action, crawl errors, blocked URLs - all good. Some crawl errors on other pages relating to broken links. All sorted and marked as fixed. Checked for duplicate content - redirected non www version of site to www Checked back links Removed video from home page that was temporarily unavailable when we did fetch and render Added canonical tag Added H1 tag that was missing Coding checked - all looks good There has been no change to the content of the page. We have fetched and rendered and resubmitted for indexing but it's still not coming back in SERPS it did for a short time the other day and then after a couple of days disappeared again Prior to all this it had ranked really well for our most important keywords for years. It's not a new site. The page is indexed as it comes up when doing a site: search. Please can anyone help? Nobody seems to have the answer and we don't know what else to do. The site is NSFW NSFW https://goo.gl/dwA8YB Main keyword sex toy party
Intermediate & Advanced SEO | | GemmaApril0 -
Syntax: 'canonical' vs "canonical" (Apostrophes or Quotes) does it matter?
I have been working on a site and through all the tools (Screaming Frog & Moz Bar) I've used it recognizes the canonical, but does Google? This is the only site I've worked on that has apostrophes. rel='canonical' href='https://www.example.com'/> It's apostrophes vs quotes. Could this error in syntax be causing the canonical not to be recognized? rel="canonical"href="https://www.example.com"/>
Intermediate & Advanced SEO | | ccox10 -
6 .htaccess Rewrites: Remove index.html, Remove .html, Force non-www, Force Trailing Slash
i've to give some information about my website Environment 1. i have static webpage in the root. 2. Wordpress installed in sub-dictionary www.domain.com/blog/ 3. I have two .htaccess , one in the root and one in the wordpress
Intermediate & Advanced SEO | | NeatIT
folder. i want to www to non on all URLs Remove index.html from url Remove all .html extension / Re-direct 301 to url
without .html extension Add trailing slash to the static webpages / Re-direct 301 from non-trailing slash Force trailing slash to the Wordpress Webpages / Re-direct 301 from non-trailing slash Some examples domain.tld/index.html >> domain.tld/ domain.tld/file.html >> domain.tld/file/ domain.tld/file.html/ >> domain.tld/file/ domain.tld/wordpress/post-name >> domain.tld/wordpress/post-name/ My code in ROOT htaccess is <ifmodule mod_rewrite.c="">Options +FollowSymLinks -MultiViews RewriteEngine On
RewriteBase / #removing trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ $1 [R=301,L] #www to non
RewriteCond %{HTTP_HOST} ^www.(([a-z0-9_]+.)?domain.com)$ [NC]
RewriteRule .? http://%1%{REQUEST_URI} [R=301,L] #html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^.]+)$ $1.html [NC,L] #index redirect
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.html\ HTTP/
RewriteRule ^index.html$ http://domain.com/ [R=301,L]
RewriteCond %{THE_REQUEST} .html
RewriteRule ^(.*).html$ /$1 [R=301,L]</ifmodule> The above code do 1. redirect www to non-www
2. Remove trailing slash at the end (if exists)
3. Remove index.html
4. Remove all .html
5. Redirect 301 to filename but doesn't add trailing slash at the end0 -
Can we mix up Wordpress and Html?
I have wordpress website. Now I am planning to add html service landing page into it. (by uploading html page on the root folder). After uploading it may look like below URL. My question is can I Html in wordpress website? Google like it or not? http://www.purpleflareagency.com/las-vegas-printing.html
Intermediate & Advanced SEO | | AlexanderWhite0 -
Brackets vs Encoded URLs: The "Same" in Google's eyes, or dup content?
Hello, This is the first time I've asked a question here, but I would really appreciate the advice of the community - thank you, thank you! Scenario: Internal linking is pointing to two different versions of a URL, one with brackets [] and the other version with the brackets encoded as %5B%5D Version 1: http://www.site.com/test?hello**[]=all&howdy[]=all&ciao[]=all
Intermediate & Advanced SEO | | mirabile
Version 2: http://www.site.com/test?hello%5B%5D**=all&howdy**%5B%5D**=all&ciao**%5B%5D**=all Question: Will search engines view these as duplicate content? Technically there is a difference in characters, but it's only because one version encodes the brackets, and the other does not (See: http://www.w3schools.com/tags/ref_urlencode.asp) We are asking the developer to encode ALL URLs because this seems cleaner but they are telling us that Google will see zero difference. We aren't sure if this is true, since engines can get so _hung up on even one single difference in character. _ We don't want to unnecessarily fracture the internal link structure of the site, so again - any feedback is welcome, thank you. 🙂0 -
Page HTML great for humans, but seems to be very bad for bots?
We recently switched platforms and use Joomla for our website. Our product page underwent a huge transformation and it seems to be user friendly for a human, but when you look at one of our product pages in SEOBrowser it seems that we are doing a horrible job optimizing the page and our html almost makes us look spammy. Here is an example or a product page on our site: http://urbanitystudios.com/custom-invitations-and-announcements/shop-by-event/cocktail/beer-mug And, if you take a look in something like SEObrowser, it makes us look not so good. For example, all of our footer and header links show up. Our color picker is a bunch of pngs (over 60 to be exact), our tabs are the same (except for product description and reviews) on every single product page... In thinking about the bots: 1-How do we handle all of the links from footer, header and the same content in the tabs 2-How do we signal to them that all that is important on the page is the description of the product? 3-We installed schema for price and product image, etc but can we take it further? 4-How do we handle the "attribute" section (i.e. our color picker, our text input, etc). Any clarification I need to provide, please let me know.
Intermediate & Advanced SEO | | UrbanityStudios0 -
Does Schema.org markup require a HTML 5 doctype?
I would like to implement Schema/microdata on a clients website, but the site is currently XHTML. Is html5 required for the micro data tags to be recognised? Will it work if I implement micro data on my XHTML site? Thanks for any advice you can offer.
Intermediate & Advanced SEO | | cmaddison1