Html code for none .index
-
In the diagnostic I have several errors in Duplicate Page Content and Title. The thing is that the errors is on the same page but with "different" names. One is called http://siteX.com/ another is called http://www.siteX.com/ and the same third one is called
http://www.siteX.com/index.htmlHow do I go about changing all three sites, I have changed the /index.html one but dont know how to catch the other once. Is it possible, if it is I would like to know how?
-
An other thing.
I missed changing the example.com to my site and no it goes to example.com, even if I change it or even delete the file...still there.
I there a way to go around it?
-
I have done the following, is that correct? If it is why cant I see any directions, for ex. I put www.siteX.com/index.html or siteX.com and get the same ?
-FrontPage-
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.html\ HTTP/
RewriteRule ^index.html$ http://example.com/ [R=301,L]IndexIgnore .htaccess /.?? *~ *# /HEADER /README /_vti
<limit get="" post="">order deny,allow
deny from all
allow from all</limit>
<limit put="" delete="">order deny,allow
deny from all</limit> -
Okay, the fact you already have an .htaccess file means you should be able to try adding the rules I provided. Put them at the top of the .htaccess file and test.
-
Please take what I say below with a grain of salt, as I am very good with .htaccess, but not so great when Frontpage is in the loop. Also back up ALL files before making ANY changes for quick replace if creates a "Internal Server Error"
_vti_bin/
_vti_adm
_vti_authShould be in your structure, each with an .htaccess
add the line
Options +FollowSymlinks
to each one
Now the just add everything streamline metrics has suggested, to the current .htaccess and test
You can try adding what streamline metrics suggests, without the above steps, as .htaccess is not dependent on Frontpage, and the Frontpage extensions have nothing to do with .htaccess (from research i found on the web)
-
I am not sure what kind of server I have but this is whats in my .htaccess
-FrontPage-
IndexIgnore .htaccess /.?? *~ *# /HEADER /README /_vti
<limit get="" post="">order deny,allow
deny from all
allow from all</limit>
<limit put="" delete="">order deny,allow
deny from all</limit>How do I do it?
-
The first step would be to redirect the http://siteX.com to http://www.siteX.com or vice versa. You can easily do this with .htaccess if you have a LAMP server. Here is the code to put in your .htaccess to redirect from non-www to www (replace example.com with your site name) -
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]As for handling http://siteX.com/index.html, simply redirect that as well with .htaccess -
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.html\ HTTP/
RewriteRule ^index.html$ http://example.com/ [R=301,L]I would also suggest adding a rel="canonical" tag to your pages just in case the search engines come across URLs with parameters, such as index.html?q=1235 then they know to index only the version of the page you designated.
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
-
How do I carry out a redirect? Is there a code I need to use?
How do I carry out a redirect? Is there a code I need to use? Thank you in advance.
On-Page Optimization | | laurentjb0 -
What is the best use of canonical ref on home (default/index) page?
Moz reports show duplicate content for my www.domain.com and www.domain.com/default.html How do I format the canonical ref to put on the default.html page?
On-Page Optimization | | bhsiao0 -
Can I have schema.org links as relative on my site? Getting an html validation error.
I'm getting an html validation error on relative schema.org links "Bad value //schema.org/Organization for attribute itemtype on element div: The string //schema.org/Organization is not an absolute URL." This is my code for https site: <code class="input">e itemtype="//schema.org/Organization"><a itemprop="url" class="navbar-brand" …<="" code=""></a></code>
On-Page Optimization | | RoxBrock0 -
"translation" of code in htaccess file
Hi everyone! I am a newbie to the whole SEO and html thing and I am trying to get a better understanding of the "behind the scenes" part of my website. I hope I can find someone here who can translate a piece of code for me that I have in my htaccess file: Options -Multiviews
On-Page Optimization | | momof4
Options +FollowSymLinks
rewritecond $1 !^(index.php|public|tmp|robots.txt|template.html|favicon.ico|images|css|uploads)
rewritecond %{REQUEST_FILENAME} !-f
rewritecond %{REQUEST_FILENAME} !-d
rewriterule ^(.*)$ index.php?link=$1 [NC,L,QSA] I know that something is getting redirected to the index file, but what (or when) exactly? Does the word "robots"mean that search engine crawlers are getting redirected here? And is this good or bad (in terms of SEO)? Or is this redirecting people who try to get to my robots/ template or image files?? Thanks in advance for any answers!0 -
Errors when checking W3C HTML after added Google Custom Search
hello, I have added google custome search to my website, and then check with W3C HTML, it report many error.
On-Page Optimization | | JohnHuynh
eg: there is no attribute "enableHistory" <gcse:searchbox-only enablehistory="true" autocompletemaxcompletions="5" au…<br="">or there is no attribute "resultsUrl" and so on ...</gcse:searchbox-only> Has anyone face with this problem, I don't know how to fix it. Please help!0 -
Are there any SEO benefits changing the default home page filename (index.htm) to a keyword rich filename
II'm a newbie. I have a website using the default home page filename: index.htm. I have total control over the web server. I was wondering whether I can get any SEO improvements for my main keyword if I change the default filename with a filename that contains the main keyword, like our-main-product.htm (doing the 301 redirect and changing the server search order, of course)?
On-Page Optimization | | Grafimart0 -
The correct way to go from PHP site to HTML site?
I have a website fully coded in PHP and I am doing a re-design over to an HTML site. I searched through the Q&A and there were some conflicting answers. Some said you will need to 301 all the pages. Others said to use the .htaccess to parse all the files as html. What is the correct way I should go about this? Thanks in advance!
On-Page Optimization | | reliabox0 -
My Images Aren't Indexed By Goolge
My site is indexed by google, and there hasn't really been much of a problem with my content, but now I am noticing that none of our images are coming up in the images searches of google. I mean none. I have even typed in the alt text of the image verbatim and nothing shows up. I use wordpress if this helps anyone. Any advice would be awesome, Thanks a lot.
On-Page Optimization | | Caseman0