My .htaccess has changed, what do i do to avoid it again...?
-
Hello
Today i notice that our site did not auto changed from without www to with, when i checked the .htaccess file i notice # in-front of each line and i know we did not insert it in there, after i removed it it worked fine.
The only changes that we did recently was to a mobile version to the site but the call to autodirect is in a JS and not in the .htaccess,
could it be the server..? is there any way that anything else might cause this...?
The site is HTML and WP could it be because of that...?
Thank's
Simo
-
Before you changed the file back did you see the last time it was modified? might give you a clue what happened. As Alan said check other files have not been changed (malware/hacked) again checking the modified dates gives you a clue ( files you know have not been touched having a recent modified date, all the files having the same modified date... etc)
-
Malware often changes the htaccess file, you should check to see if there is anything else in there.
WordPress sites are prone to being hacked. i develop in .net and have never ever had a site hacked, yet i see this is WP and joomla all the time.
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
-
Canonical URL Change
Hi, I have a Product Page, say www.example.com/product-title/.
Technical SEO | | viatrading1
Canonical URL is www.example.com/product-title/ I want to change its URL to www.example.com/product-title-2/
Canonical URL is www.example.com/product-title-2/
Can't do 301 Redirect. Is SEO Juice passed from www.example.com/product-title/ to www.example.com/product-title-2/ ? Thanks,0 -
.htaccess code
I've got a .htaccess file set up on a site to redirect specific old pages to specific new pages on a different site: eg Redirect 301 /oldpage.html https://www.newsite.co.uk/newpage.html Redirect 301 /oldpage2.html https://www.newsite.co.uk/folder/ I have two questions: 1. Is that all the file needs? Or does it need any "rewrite engine on" type code? 2. I would also like to include code to "mop up" any other URLs and redirect them to the root, so that /anyotherpage.html redirects to newsite.co.uk Is there a way to do this?
Technical SEO | | abisti20 -
My site has dropped in rankings what can i do to change this
My site is http://www.clairehegarty.co.uk/ Hi, my site has always done amazing in the rankings, for a few years i have been number one for the word gastric band hypnotherapy as well as many other keywords which includes hypno band. but in the past couple of weeks i have seen some of my keywords drop and end up on pages two and three of google instead of page one. Can anyone please give me advice on what i need to do to change this situation please
Technical SEO | | ClaireH-1848860 -
My homepage+key pages have dropped 40+ positions after implementing redirects and canonical changes. HELP!
Hi SEOMozers, I work for a web based nonprofit at www.tisbest.org. I had a professional contact recommend that we work on our redirects to our homepage because we were losing valuable rank benefit. This combined with getting sick of seeing our weekly SEOMoz crawl reports show 304 duplicate page and title errors for months. No one could seem to figure out what was happening (we think it had to do with session stuff; we were seeing several versions of each page showing the following: www.tisbest.org/default.aspx/(random character string) My developer and I read a bunch of articles and started making changes 10 days ago: He setup 301 redirects from http://tisbest.org to http://www.tisbest.org. (set the canonical domain). We did a redirect from http://www.tisbest.org/default.aspx to root with "/". I set the canonical setting to www.tisbest.org in our webmaster tools. In our web config (we're running in asp.net), we changed our session detection from auto-detect then saw some session funkiness so we changed it back. Though we do think the character strings we were seeing were session GUID. He forced lower case URL’s to reduce duplicate page content/titles. I got my weekly crawl report 9 days ago and we had dropped from 340 duplicate page title and page content errors went to one. We went nuts and felt like the kings of SEO. Then, yesterday (9/28), the SEO grim reaper came knocking when I received my weekly SEOMoz ranking report. It said we had dropped 40+ spots for all of 9 of our keywords. Sure enough, I searched our keywords and our website was gone. Then I searched our company name, tisbest, and only a few of our pages show but not the homepage. I searched for our URL www.tisbest.org, and I originally got the expanded view (with 8 links to various webpages - can't remember what this view is called) but now, today (Saturday), the expanded view is gone from this search result. Also, when I run the On Page Report card for our homepage, I get the following error message with no results: "We were unable to grade that page. The page did not load. Curl::Err::TooManyRedirectsError: Number of redirects hit maximum amount." When I run the Open Site explorer report, I get this message at the top: Oh Hey! It looks like that URL redirects to www.tisbest.org/?AspxAutoDetectCookieSupport=1. Would you like to see data for <a class="clickable redirects">that URL instead</a>?" If I go to the report for the that report's page, it says that "No information is available for that URL." Just tonight (night of 9/29), our developer added the rel="canonical" href="http://www.tisbest.org" /> to our homepage tonight to see if that would help. We did not do that originally. In our Google Webmaster tools, I am seeing the number of URL Error - Not Followed has sky rocked. I have attached a screen capture to this thread. There are also a large number of URL Errors - Not Found errors as well. I did some research tonight and downloaded and ran Screaming Frog SEO Crawler. I have attached a screen capture below with this report and a couple of questions I sent our developer that may be helpful to you. Also, not sure if this is relevant, we use a master page that all of our pages inherit from so all of our pages get the same meta-data: name="keywords" content="charitable gift card, charitable gift certificate, non profit gift card, charity donation, giftcard, charity gift card, donation gift card, donation gift, charity gift, animal gift card, animal gift, environmental gift card, environmental gift, humanitarian gift card, humanitarian gift, christian gift card, christian gift, catholic gift card, catholic gift, religious gift card, religious gift" />id="ctl00_metaDescription" name="description" content="Award winning Charity Gift Card, for over 250 premier charities. A customized donation gift that makes the world better. TisBest is BBB Accredited." />name="google-site-verification" content="EfJIhN3h2SVSXdSpUbfceBVw2q6zrGX8rRQhdNZ1xY8" /><title></span><span> </span></p> <p>Can anyone help me/us identify the issue that obliterated our rankings? I am happy to give an information needed. Thank you! Chad Edwards</p> <a download="Bqcu1.png" class="imported-anchor-tag" href="http://i.imgur.com/Bqcu1.png" target="_blank">Bqcu1.png</a> <a download="ZXQ8d.png" class="imported-anchor-tag" href="http://i.imgur.com/ZXQ8d.png" target="_blank">ZXQ8d.png</a></title>
Technical SEO | | TisBest0 -
Changed URLs from Upper to Lower Case, and lost page authority should we switch back?
During an overhaul of our site architecture we switched from having capitals in our urls to all lower case, we did the 301's but the page authority is not nearly what it was should we switch back? (new) http://www.usleaseoption.com/rent-to-own/florida vs (old) http://www.usleaseoption.com/rent-to-own/Florida/
Technical SEO | | mjo1360 -
HTACCESS redirect vs. forwarding
I'm having trouble using htaccess redirect to redirect a subdomain to a new domain on a different server. Tech support at godaddy suggested I forward the subdomain. The subdomain has already been cached by google. Will forwarding in this way have the same affect (SEO wise) as an htaccess redirect??
Technical SEO | | triple90 -
Lost FaceBook Shares with URL change
I recently changed the URL of a page and used a 301 redirect from old to new. I just realized I lost all my Facebook shares. Now it shows 0 on that page. What can I do to get back my count of shares? I cannot find any information.
Technical SEO | | MiamiWebCompany0 -
Changing CMS, are there SEO effects?
We want to change our cms from typo3 to CMS made Simple. We have done this already for another site and it effected the rankings. Have you got experience with this? What factors are important for SEO to consider? Is it normal when you change from cms the rankings will drop?
Technical SEO | | PlusPort0